let Strategy hold a sorted roi map

This commit is contained in:
Janne Sinivirta
2018-02-06 16:31:50 +02:00
parent a28ffcbcf7
commit 5c02f0983d
2 changed files with 5 additions and 2 deletions

View File

@@ -302,7 +302,7 @@ def min_roi_reached(trade: Trade, current_rate: float, current_time: datetime) -
# Check if time matches and current rate is above threshold
time_diff = (current_time - trade.open_date).total_seconds() / 60
for duration, threshold in sorted(strategy.minimal_roi.items()):
for duration, threshold in strategy.minimal_roi.items():
if time_diff > float(duration) and current_profit > threshold:
return True