Hi all,
Today I noticed that my backtest results were completely off compared with last week results. After investigation I found out that a new bug was introduced in de Backtest code regardig calling a custom indicator on a higher timeframe.
The indicator gives completely wrong results now when you ‘CALL’ it on a higher timeframe.
So let’s say I have a backtest that uses the 1 and 5 minute timeframes. And I CALL a custom indicator on the 5min TF. Then the results are completely off.
When I replace the CALL with the indicator code itself, then the results are OK.
I’m pretty sure this was not a problem last week.
I’ve added 2 screenshots to illustrate the bug.
‘testHTFbug’ indicator code:
return highest[20](high)
Backtest code:
(It only contains the 5min TF, as this is enough to trigger the bug when you open up the chart on the 1min TF)
TIMEFRAME(5 minutes)
indOK = highest[20](high)
indBUG = CALL "testHTFbug" //= highest[20](high)
graphonprice indOK coloured(0,255,0,100) //green line
graphonprice indBUG coloured(255,0,0,100) //red line
//dummy code, otherwise won't compile
if 1=2 then
BUY 1 CONTRACT AT MARKET
SET TARGET $PROFIT 100
SET STOP $LOSS 100
endif
thanked this post
Try it with
timeframe(5minute, updateonclose)
Try it with timeframe(5minute, updateonclose)
yes, with updateonclose the bug is not triggered.
Nevertheless, without updateonclose the 2 indicators should return the same values (as it did last week)
thanked this post
JSParticipant
Senior
The code shows no discrepancies with the data from IG, but the same code does show discrepancies with the data from IB…
I don’t know where the discrepancies in IB come from, but something is definitely going wrong there…
The best is to submit a support request (via Help)…
The code shows no discrepancies with the data from IG, but the same code does show discrepancies with the data from IB… I don’t know where the discrepancies in IB come from, but something is definitely going wrong there… The best is to submit a support request (via Help)…
Oh thanks for checking IG and IB, didn’t know that could lead to discrepancies as well…weird..
Already submitted a support request.
This is crazy!!! I realised this problem yesterday and I am in panic!
I think it is just a visual bug for backtest which is not affected by in livetrading in proorder. But if so, I would lose multum of money. This really needs to be looked at. Have you got any response for it?
Yes this week finally some response, but it still needs to be forwarded to the dev team…
No idea why it’s so slow. I wish they were more interactive, or at least a dev monitoring this board..a page with known issues, or features in progress…
Now everytime I run into odd things I have to figure out if it’s a known issue or not. Takes hours..
But don’t panic 😉 It’s just the backtest. They were smart enough not to implement the CALL functionality in the live trading environment. You can check it yourself when you open your running systems and click the version. The indicator code is copied in your system code. So no references.
Yeah nevtek also realised it was only backtest related (THANKFULLY).
It seems like they are aware of the problem now and it hopefully it is taken care of.
Prorealtime UPDATE:
Thank you for your response. The issue has been identified regarding the functioning of CALL instruction. A fix will be made as soon as possible.
We regret the inconvenience and we remain at your disposal.
Best Regards,
Got email today, it has been fixed and rolled out last thursday.
It works for me again.