mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 04:03:55 +00:00
Merge pull request #2659 from hroff-1902/fix_mypy
[critical]: Fix mypy errors in develop
This commit is contained in:
commit
18dfa56752
|
@ -272,7 +272,7 @@ class Backtesting:
|
||||||
elif sell.sell_type == (SellType.ROI):
|
elif sell.sell_type == (SellType.ROI):
|
||||||
roi_entry, roi = self.strategy.min_roi_reached_entry(trade_dur)
|
roi_entry, roi = self.strategy.min_roi_reached_entry(trade_dur)
|
||||||
if roi is not None:
|
if roi is not None:
|
||||||
if roi == -1 and roi_entry % self.timeframe_mins == 0:
|
if roi == -1 and roi_entry % self.timeframe_min == 0:
|
||||||
# When forceselling with ROI=-1, the roi time will always be equal to trade_dur.
|
# When forceselling with ROI=-1, the roi time will always be equal to trade_dur.
|
||||||
# If that entry is a multiple of the timeframe (so on candle open)
|
# If that entry is a multiple of the timeframe (so on candle open)
|
||||||
# - we'll use open instead of close
|
# - we'll use open instead of close
|
||||||
|
@ -283,7 +283,7 @@ class Backtesting:
|
||||||
(1 + trade.fee_open)) / (trade.fee_close - 1)
|
(1 + trade.fee_open)) / (trade.fee_close - 1)
|
||||||
|
|
||||||
if (trade_dur > 0 and trade_dur == roi_entry
|
if (trade_dur > 0 and trade_dur == roi_entry
|
||||||
and roi_entry % self.timeframe_mins == 0
|
and roi_entry % self.timeframe_min == 0
|
||||||
and sell_row.open > close_rate):
|
and sell_row.open > close_rate):
|
||||||
# new ROI entry came into effect.
|
# new ROI entry came into effect.
|
||||||
# use Open rate if open_rate > calculated sell rate
|
# use Open rate if open_rate > calculated sell rate
|
||||||
|
|
Loading…
Reference in New Issue
Block a user