Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Misc Questions

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

    Misc Questions

    I find that I often have different results between back testing a strategy VS forward testing strategy on market recorded data over the same period. Are there any ways of improving backtesting results to be more congruent with forward testing results?

    Are there any known data vendors that offer market recorded data that can be imported into Ninjatrader that I can use for forward testing?

    I also find that I get different results when forward testing a strategy in the market replay connection depending on whether I load the strategy on to a chart VS in the strategy tab. What might be some reasons for this?

    When a strategy is started without being attached to a chart are historical bars loaded to give accurate indicator readings for that moment? Is this predicated upon the min bars required parameter?

    When a multi-time frame strategy is loaded to a chart how much data is loaded to the higher time frames? I am assuming this is related to how much data is in the chart loaded?

    The strategy I am testing is a multi time frame strategy that uses a 70tick(primary) 210 tick and 630 tick time frames.

    Thanks in advance.

    #2
    Originally posted by jcwolfe00 View Post
    I find that I often have different results between back testing a strategy VS forward testing strategy on market recorded data over the same period. Are there any ways of improving backtesting results to be more congruent with forward testing results?

    Are there any known data vendors that offer market recorded data that can be imported into Ninjatrader that I can use for forward testing?

    I also find that I get different results when forward testing a strategy in the market replay connection depending on whether I load the strategy on to a chart VS in the strategy tab. What might be some reasons for this?

    When a strategy is started without being attached to a chart are historical bars loaded to give accurate indicator readings for that moment? Is this predicated upon the min bars required parameter?

    When a multi-time frame strategy is loaded to a chart how much data is loaded to the higher time frames? I am assuming this is related to how much data is in the chart loaded?

    The strategy I am testing is a multi time frame strategy that uses a 70tick(primary) 210 tick and 630 tick time frames.

    Thanks in advance.
    Jcwolfe, one of the better ways to make backtests more like the forward tests is to add slippage, anywhere from 2-4 ticks per fill.

    NinjaTrader 7, combined with the Zen-Fire connection, is capable of downloading and playing back Market Replay data.

    There should be very little difference between a strategy on a chart and a strategy from the tab. It would depend on how the tick bars are built (from which ticks), which varies depending on when you start the strategy.

    When a strategy is started, it loads as much historical data as you want it to, but I believe the default is two days, which is more than enough in most cases.

    I just want to add one more thing: the best way to test a strategy is to run it real-time on the demo account (not Market Replay), because that would give you the most realistic fills.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks for the info and tips. I never even thought about different ticks building the bars, which would explain discrepancies in some forward tests on the same data.

      One last quick question that once again relates to my 3 time frame strategy.
      The strategy is set to update on every bar close. All are being called on the 70 tick time frame.

      IE

      if(bars in progress != 0)
      return;

      When I use an indicator cross on a higher timeframe for exit signal it is not waiting for that higher timeframes bar to close, correct? It will do it intrabar on the higher timeframe but will wait for a bar to close on the main timeframe - 70 tick in this case.

      Comment


        #4
        jcwolfe00, no unfortunately not, as the CalculateOnBarClose setting applies to all OnBarUpdates() being processed, thus to process higher time frames intrabar you would need to set it to 'false' and then process 'on bar close' logic in

        Code:
         
        if (FirstTickOfBar)
        {
        do on bar close calcs
        }

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          jcwolfe00, no unfortunately not, as the CalculateOnBarClose setting applies to all OnBarUpdates() being processed, thus to process higher time frames intrabar you would need to set it to 'false' and then process 'on bar close' logic in

          Code:
           
          if (FirstTickOfBar)
          {
          do on bar close calcs
          }

          Thanks a bunch, this is very helpful.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X