File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1681,6 +1681,7 @@ def min_roi_reached_entry(
16811681 """
16821682
16831683 # Get custom ROI if use_custom_roi is set to True
1684+ custom_roi = None
16841685 if self .use_custom_roi :
16851686 custom_roi = strategy_safe_wrapper (
16861687 self .custom_roi , default_retval = None , supress_error = True
@@ -1692,11 +1693,9 @@ def min_roi_reached_entry(
16921693 entry_tag = trade .enter_tag ,
16931694 side = trade .trade_direction ,
16941695 )
1695- if not custom_roi or isnan (custom_roi ) or isinf (custom_roi ):
1696+ if custom_roi is None or isnan (custom_roi ) or isinf (custom_roi ):
16961697 custom_roi = None
16971698 logger .debug (f"Custom ROI function did not return a valid ROI for { trade .pair } " )
1698- else :
1699- custom_roi = None
17001699
17011700 # Get highest entry in ROI dict where key <= trade-duration
17021701 roi_list = [x for x in self .minimal_roi .keys () if x <= trade_dur ]
You can’t perform that action at this time.
0 commit comments