Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to let strategy calculate again on a new day in back test?

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

    how to let strategy calculate again on a new day in back test?

    [IMG]file:///C:/Users/b/AppData/Local/Temp/moz-screenshot.jpg[/IMG]Hi. I am trying to backtest the sample moving average system. as in the picture, the moving avgs cross because the bars on the left and the right are on different days. How can I set up so that the backtest doesn't enter trades based on different day's data?
    Attached Files

    #2
    You can restrict the first entry from certain hour, you can make a 24H session and more. Some methods require programming. I don't know what is your MA's lengths and what time frame you have, but for example if you have 80 period MA and 5Min chart and you want the MA to relay on the current day price, you will have only one last bar to count on. (Each pit session has 81 bars and 80 period MA needs 80 bars!).

    Baruch

    Comment


      #3
      Please check into this sample for a time filter to limit the trading hours of your strategy - http://www.ninjatrader-support2.com/...ead.php?t=3226

      The same could be done in the Strategy Wizard -

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      60 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      148 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      284 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X