HTF indicator call bug in Backtest code
Forums › ProRealTime English forum › ProOrder support › HTF indicator call bug in Backtest code
- This topic has 7 replies, 4 voices, and was last updated 23 hours ago by
Franro.
-
-
05/26/2025 at 6:39 PM #247630
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:
testHTFbug indicator1return 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)
backtest code123456789101112TIMEFRAME(5 minutes)indOK = highest[20](high)indBUG = CALL "testHTFbug" //= highest[20](high)graphonprice indOK coloured(0,255,0,100) //green linegraphonprice indBUG coloured(255,0,0,100) //red line//dummy code, otherwise won't compileif 1=2 thenBUY 1 CONTRACT AT MARKETSET TARGET $PROFIT 100SET STOP $LOSS 100endif1 user thanked author for this post.
05/26/2025 at 8:43 PM #24763405/27/2025 at 10:36 AM #247645Try 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)1 user thanked author for this post.
05/27/2025 at 11:50 AM #247646The 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)…05/27/2025 at 12:38 PM #247650The 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.06/06/2025 at 8:07 AM #247994This 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?
06/06/2025 at 9:55 AM #248004Yes 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.
06/06/2025 at 10:39 AM #248010 -
AuthorPosts
Find exclusive trading pro-tools on