Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting not working for CalculateOnBarClose

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Backtesting not working for CalculateOnBarClose

    Hello Guys

    I'm backteting my strategy, but on the backtest I noticed it is not working for every inconming tick, looks like it is working with CalculateOnBarClose set to true. I see that because on the backtest results chart it show Entries on at the end/beginning of a bar, although price crossed bar in the meantime.

    On initialize() CalculateOnBarClose is set to false, how can I make backtesting to work as if it was running on each incoming tick?

    Thanks

    Rodrigo

    #2
    Hello rgaleote,

    Thanks for your post.

    Backtesting uses historical bars which do not contain the ticks that made up the bar (unlike market replay), so what you are reporting is expected behavior and the behavior on historical bars is the same as if CalculateOnbarClose were true (even though you set it to false).

    Here is a reference sample on "Backtesting NinjaScript Strategies with an intrabar granularity". http://www.ninjatrader.com/support/f...ead.php?t=6652
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by techgetgame, Yesterday, 11:42 PM
    0 responses
    8 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Yesterday, 11:36 PM
    0 responses
    2 views
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,613 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Yesterday, 05:56 PM
    0 responses
    10 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    20 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X