Possible issue with ProBacktest?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14460 quote
    tikitaka
    Participant
    Average

    Hi, this question is, I’m afraid, directed to Nicolas.  Désolé.

    I’m an end-of-day free platform user.

    When trying to debug the code for the strategy presented by the forum member quo, I’ve found that for non-US/UK stocks, functions like BarIndex, High  or Low give values corresponding to the bar previous to the bar currently active in the flow of the code.

    This delay of one bar causes logical errors in the strategy or in the best of cases produces buys or sells one bar later than expected, which is inadmissible, especially on weekly or monthly time frames.

    To prove the case and just to be on the safe side, being the tool graph a little tricky when there is any kind of error in the code, I’ve used the simplest of trading systems to graph barindex and high of an US stock (MU) and a french one (ORA):

    // _ts_Dummy
    if not onmarket and 1 < 0 then   // do nothing
    buy 1 shares at market
    endif
    
    graph high coloured (0,255,0)
    graph barIndex coloured (255,0,0)
    // end of _ts_Dummy
    
    

    Are you aware of this issue or am I just nuts?

    Merci et bon week-end. Pas de hâte (I’m not nuts. Yet)

    ORA.png ORA.png MU.png MU.png
    #14472 quote
    Nicolas
    Keymaster
    Master

    Bonjour,

    Like you may already know, PRT only read and launch code script once per bar, at its Close. Trades are then launched at the next Open.

    I see you are end-of-day user, it may also have effect on the code, but I don’t think so though.

    About the barindex 0 or 1, did you try to “preload” some bars? Why do you think starting the count of Barindex between 0 or 1 from the very first bar of history may cause difference in your TS ❓

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Possible issue with ProBacktest?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
tikitaka @tikitaka Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/07/2016
Status: Active
Attachments: No files
Logo Logo
Loading...