@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?
TV is an array-processing backtester, and bt as event-driven backtester. Therefore bt can't take a look inside the bar by design, it uses delivery of the bar as event to trigger algo. TV can do whatever end user programmed in it, and has a lot more possibility to fall into future lookahead bias.
By the way, TVs assumption can be really dangerous. I am surprised that they take that responsibility on them. Usually all backtesters give an opportunity to decide on what signal to take on the same bar to end user.
@ayush-somani said in Indicator that checks if the current candle high (as soon as a condition is met) breaks the previous days high (over a specific period ) or not:
if self.datas.high < self.datas.high[-int(self.l.firsthighindex)]:
Using MaxN might be more straight forward.
@ab_trader Yes, logs in next() led me to put debugs in bt to check for the issue and I was able to nail it to the case with RollOver included. I see that RollOver is hardly used by anyone especially for Options, so I changed the way of handling this and avoided RollOver in total. Without RollOver data looks fine.
Appreciate your time and responses. Please continue your outstanding and support and help.