From fb6e843f02790c397c83a1aa253e82845a9aaa90 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Mon, 22 Jul 2024 23:51:27 +0300 Subject: [PATCH] (feat) add more records to candles --- bots/controllers/directional_trading/macd_bb_v1.py | 2 +- bots/controllers/market_making/pmm_dynamic.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/controllers/directional_trading/macd_bb_v1.py b/bots/controllers/directional_trading/macd_bb_v1.py index 0dfc905..a516472 100644 --- a/bots/controllers/directional_trading/macd_bb_v1.py +++ b/bots/controllers/directional_trading/macd_bb_v1.py @@ -84,7 +84,7 @@ class MACDBBV1Controller(DirectionalTradingControllerBase): def __init__(self, config: MACDBBV1ControllerConfig, *args, **kwargs): self.config = config - self.max_records = max(config.macd_slow, config.macd_fast, config.macd_signal, config.bb_length) + self.max_records = max(config.macd_slow, config.macd_fast, config.macd_signal, config.bb_length) + 200 if len(self.config.candles_config) == 0: self.config.candles_config = [CandlesConfig( connector=config.candles_connector, diff --git a/bots/controllers/market_making/pmm_dynamic.py b/bots/controllers/market_making/pmm_dynamic.py index 9d02733..3b90fad 100644 --- a/bots/controllers/market_making/pmm_dynamic.py +++ b/bots/controllers/market_making/pmm_dynamic.py @@ -87,7 +87,7 @@ class PMMDynamicController(MarketMakingControllerBase): """ def __init__(self, config: PMMDynamicControllerConfig, *args, **kwargs): self.config = config - self.max_records = max(config.macd_slow, config.macd_fast, config.macd_signal, config.natr_length) + 10 + self.max_records = max(config.macd_slow, config.macd_fast, config.macd_signal, config.natr_length) + 200 if len(self.config.candles_config) == 0: self.config.candles_config = [CandlesConfig( connector=config.candles_connector,