Added some bigfixes for sell_tag

This commit is contained in:
theluxaz
2021-10-13 01:22:53 +03:00
parent c9edf3bf4a
commit 80b71790bc
5 changed files with 14 additions and 10 deletions

View File

@@ -48,6 +48,7 @@ def migrate_trades_table(decl_base, inspector, engine, table_back_name: str, col
sell_reason = get_column_def(cols, 'sell_reason', 'null')
strategy = get_column_def(cols, 'strategy', 'null')
buy_tag = get_column_def(cols, 'buy_tag', 'null')
sell_tag = get_column_def(cols, 'sell_tag', 'null')
# If ticker-interval existed use that, else null.
if has_column(cols, 'ticker_interval'):
timeframe = get_column_def(cols, 'timeframe', 'ticker_interval')

View File

@@ -326,7 +326,7 @@ class LocalTrade():
'profit_abs': self.close_profit_abs,
'sell_reason': (f' ({self.sell_reason})' if self.sell_reason else ''), #+str(self.sell_reason) ## CHANGE TO BUY TAG IF NEEDED
'sell_tag': self.sell_tag,
'sell_tag': (f' ({self.sell_tag})' if self.sell_tag else '') ,
'sell_order_status': self.sell_order_status,
'stop_loss_abs': self.stop_loss,
'stop_loss_ratio': self.stop_loss_pct if self.stop_loss_pct else None,