TZ fix again - wip

This commit is contained in:
Dobromir Popov
2025-08-08 01:41:30 +03:00
parent ba532327b6
commit ded7e7f008
5 changed files with 216 additions and 54 deletions

View File

@ -33,9 +33,9 @@ class StandardizedDataProvider(DataProvider):
"""Initialize the standardized data provider"""
super().__init__(symbols, timeframes)
# Standardized data storage
# Standardized data storage (separate COB cache to avoid colliding with parent caches)
self.base_data_cache: Dict[str, BaseDataInput] = {} # {symbol: BaseDataInput}
self.cob_data_cache: Dict[str, COBData] = {} # {symbol: COBData}
self.standardized_cob_data_cache: Dict[str, COBData] = {} # {symbol: COBData}
# Model output management with extensible storage
self.model_output_manager = ModelOutputManager(
@ -50,7 +50,7 @@ class StandardizedDataProvider(DataProvider):
# Initialize caches for each symbol
for symbol in self.symbols:
self.base_data_cache[symbol] = None
self.cob_data_cache[symbol] = None
self.standardized_cob_data_cache[symbol] = None
self.cob_imbalance_history[symbol] = deque(maxlen=300) # 5 minutes of 1s data
# Ensure live price cache exists (in case parent didn't initialize it)
@ -253,7 +253,7 @@ class StandardizedDataProvider(DataProvider):
cob_obj.ma_60s_imbalance = ma_data.get('60s', {})
# Cache and return
self.cob_data_cache[symbol] = cob_obj
self.standardized_cob_data_cache[symbol] = cob_obj
return cob_obj
except Exception as e: