In my strategy, in the notify_timer method, I need
self.datetime.date(0), which gives an error because of the above problem. That is, at the first bar, len(self) is 0, which result in an error when using self.datetime.date(0).
Any help is apperaciated.
@shspersonalwork I know the following about preload, however I want to know the impact of this setting on Live and Offline mode, and how did you debug the problem to this parameter setting?
"preload -> Whether to preload the different data feeds passed to cerebro for the Strategies"
Matplotlib 3.3.x is not compatible with backtrader. Matplotlib 3.2.0 is fine.
Matplotlib 3.3.x cause strange problem, plot function will exhaust memory!
my dev env:
1, Mac OS
2, python 3.7.9
3, backtrader 184.108.40.206
4, Matplotlib 3.2.0
6, datafeed: pandas dataframe
@arikenig The problem for using delayed data is that reqMarketDataType is NOT called, and that it should be called before subscribing to a delayed data feed.
If you have a live account, it is much much simpler to run your paper TWS (or gateway) on the same machine. Just take care to point to the paper TWS ! (port)
It is strange that you still have an error when both your live and paper account run on the same computer.
Do you also have on your live account delayed data for the instrument you try to trade on your paper account ?
Have you parametrized data feed sharing from your live toward your paper account ? This is something you have to setup. From the previous given IBKR.info link :
"2. Market data mirroring and sharing user selection
On the Client Portal, those functions are present in the section: Settings -> Account Settings -> Configure (gear) icon"
If you still have delayed data in your paper account, you will notice it in the API logs (you have to search the item in the TWS menu to display them, they are something like encrypted on disk)
@EdiB said in Struggling to implement custom Pandas data feed:
@Mango-Loco Hi, it seems that I am working on the same issue.
But the code snippets are not enough for me to can solve my problem.
Can you please sent to me the complete code (without trading strategy) only the part to get the own data fields in backtrader, that I can use it as indicators.
Many thanks in advance.
im having similar issues, have you found out how to solve it?