COB fixes
This commit is contained in:
@ -168,7 +168,7 @@ class StandardizedDataProvider(DataProvider):
|
||||
|
||||
# Attach COB heatmap (visual+model optional input), fixed scope defaults
|
||||
try:
|
||||
times, prices, matrix = self.get_cob_heatmap_matrix(
|
||||
times, prices, matrix, mids = self.get_cob_heatmap_matrix(
|
||||
symbol=symbol,
|
||||
seconds=300,
|
||||
bucket_radius=10,
|
||||
@ -177,6 +177,10 @@ class StandardizedDataProvider(DataProvider):
|
||||
base_input.cob_heatmap_times = times
|
||||
base_input.cob_heatmap_prices = prices
|
||||
base_input.cob_heatmap_values = matrix
|
||||
# We also store mids in market_microstructure for optional use
|
||||
if not hasattr(base_input, 'market_microstructure') or base_input.market_microstructure is None:
|
||||
base_input.market_microstructure = {}
|
||||
base_input.market_microstructure['heatmap_mid_prices'] = mids
|
||||
except Exception as _hm_ex:
|
||||
logger.debug(f"COB heatmap not attached for {symbol}: {_hm_ex}")
|
||||
|
||||
|
Reference in New Issue
Block a user