HTF indicator call bug in Backtest code

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #247630 quote
    nevtek
    Participant
    New

    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
    bugTF5_OK.png bugTF5_OK.png bugTF1_NOK.png bugTF1_NOK.png
    #247634 quote
    phoentzs
    Participant
    Master

    Try it with
    timeframe(5minute, updateonclose)

    Iván González thanked this post
    #247645 quote
    nevtek
    Participant
    New

    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
    #247646 quote
    JS
    Participant
    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)…

    Scherm­afbeelding-2025-05-27-om-12.45.05.png Scherm­afbeelding-2025-05-27-om-12.45.05.png Scherm­afbeelding-2025-05-27-om-12.44.24.png Scherm­afbeelding-2025-05-27-om-12.44.24.png
    #247650 quote
    nevtek
    Participant
    New

    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.

    #247994 quote
    deleted23092025
    Participant
    New

    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?

    #248004 quote
    nevtek
    Participant
    New

    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.

    GraHal and thanked this post
    #248010 quote
    deleted23092025
    Participant
    New

    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.

    #248035 quote
    nevtek
    Participant
    New
    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,
    robertogozzi and thanked this post
    #248260 quote
    deleted23092025
    Participant
    New
    Any updates?
    robertogozzi thanked this post
    #248302 quote
    nevtek
    Participant
    New
    Got email today, it has been fixed and rolled out last thursday. It works for me again.
    robertogozzi and GraHal thanked this post
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

HTF indicator call bug in Backtest code


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
nevtek @nevtek Participant
Summary

This topic contains 10 replies,
has 4 voices, and was last updated by nevtek
8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/26/2025
Status: Active
Attachments: 4 files
Logo Logo
Loading...