mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 05:50:36 +00:00
use max_open_trades from straetgy instead of config
This commit is contained in:
@@ -964,7 +964,7 @@ class Backtesting:
|
||||
|
||||
def trade_slot_available(self, open_trade_count: int) -> bool:
|
||||
# Always allow trades when max_open_trades is enabled.
|
||||
max_open_trades: IntOrInf = self.config['max_open_trades']
|
||||
max_open_trades: IntOrInf = self.strategy.max_open_trades
|
||||
if max_open_trades <= 0 or open_trade_count < max_open_trades:
|
||||
return True
|
||||
# Rejected trade
|
||||
|
||||
Reference in New Issue
Block a user