i did further digging into the code and i think could be a CCXT issue.
there are few reasons that could trigger the issue:
the missing symbol comes from resampled data -
- i fetch the historical data in 1m compression
- i resample the data to 1 & 2 minutes (and higher ...)
-- update - 1m timeframe data exists, all other timeframes (resample/replay) come with a missing symbol and potentially other data
the log shows a successful order for 1 minute signal, but missing the data for higher TF's:
i think i saw a thread about loading historical data doesn't work for IB's - could it be a similar issue?
found it ... (this issue)
-- update - although related, it is not relevant for our case here , i ran the process with only live data (not historical) and still there was an issue
should i use replay data instead of resample data for higher TFs ?
so 1m is resampled, and all higher TFs are replayed - could this fix the missing data?
-- update - i tried running higher TFs with replay, still same error
looking at the _GRANULARITIES in ccxtstore - i was using 2m TFs - could this be the issue? (unsupported TF) ?
- update - this could be a potential candidate, however i ran it with supported TFs and still same error:
as a reference - here is the error from the log:
this line is my code -
order_op(owner=self,data=data, size=order_size, exectype=Order.Market)
File "/anaconda3/lib/python3.6/site-packages/backtrader/brokers/ccxtbroker.py", line 88, in buy
return self._submit(owner, data, exectype, 'buy', size, price, kwargs)
File "/anaconda3/lib/python3.6/site-packages/backtrader/brokers/ccxtbroker.py", line 77, in _submit
_order = self.store.create_order(symbol=data.symbol, order_type=order_type, side=side,
File "/anaconda3/lib/python3.6/site-packages/backtrader/lineseries.py", line 461, in getattr
return getattr(self.lines, name)
AttributeError: 'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute 'symbol'