Improve some stylings

This commit is contained in:
Matthias
2021-10-24 09:15:05 +02:00
parent 78724e304e
commit 17432b2823
4 changed files with 9 additions and 6 deletions

View File

@@ -364,7 +364,11 @@ class Backtesting:
# Checks and adds an exit tag, after checking that the length of the
# sell_row has the length for an exit tag column
if(len(sell_row) > EXIT_TAG_IDX and sell_row[EXIT_TAG_IDX] is not None and len(sell_row[EXIT_TAG_IDX]) > 0):
if(
len(sell_row) > EXIT_TAG_IDX
and sell_row[EXIT_TAG_IDX] is not None
and len(sell_row[EXIT_TAG_IDX]) > 0
):
trade.sell_reason = sell_row[EXIT_TAG_IDX]
trade_dur = int((trade.close_date_utc - trade.open_date_utc).total_seconds() // 60)