Return the trade duration along with the profit threshold returned by custom_roi
This commit is contained in:
@@ -1686,7 +1686,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
|
|
||||||
# The lowest available value is used to trigger an exit.
|
# The lowest available value is used to trigger an exit.
|
||||||
if custom_roi is not None and (min_roi is None or custom_roi < min_roi):
|
if custom_roi is not None and (min_roi is None or custom_roi < min_roi):
|
||||||
return 0, custom_roi
|
return trade_dur, custom_roi
|
||||||
else:
|
else:
|
||||||
return roi_entry, min_roi
|
return roi_entry, min_roi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user