remove unnecessary condition
This commit is contained in:
parent
2ce03ab1b5
commit
9bcdc8e14b
@ -303,9 +303,9 @@ def min_roi_reached(trade: Trade, current_rate: float, current_time: datetime) -
|
|||||||
# Check if time matches and current rate is above threshold
|
# Check if time matches and current rate is above threshold
|
||||||
time_diff = (current_time.timestamp() - trade.open_date.timestamp()) / 60
|
time_diff = (current_time.timestamp() - trade.open_date.timestamp()) / 60
|
||||||
for duration, threshold in strategy.minimal_roi.items():
|
for duration, threshold in strategy.minimal_roi.items():
|
||||||
if time_diff < duration:
|
if time_diff <= duration:
|
||||||
return False
|
return False
|
||||||
if time_diff > duration and current_profit > threshold:
|
if current_profit > threshold:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user