Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading Hours Window in Backtest

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

    Trading Hours Window in Backtest

    Hi guys,

    I want to trade the NQ during the American session via a NinjaScript strategy. I'm based in Spain.

    At the moment, during the backtesting phase, I see these two approaches to follow:
    1. Set the Trading Hours template to Default 24x7 and then code an operative window within the strategy (in my case would be between 153000 and 230000 since I'm in Spain).\
    2. Set the Trading Hours template to CME US Index Futures RTH without a filter in the strategy.
    What's the best approach for the purpose of backtesting? Is there any better alternative?

    The drawback that I see with the second approach is that any indicator depending on price for its internal calculations, would receive incomplete data as input if the template selected is CME US Index Futures RTH.


    Thanks in advance,
    Damian.

    #2
    Hello Damian,

    Thanks fro your post.

    I would recommend adding in time filters to control when your logic takes trades. As you mention, taking this approach will not modify the indicator values which would be seen when changing the Data Series or Trading Hours template.

    How to create time filters in the Strategy Builder — https://ninjatrader.com/support/help...ateTimeFilters

    We look forward to assisting.

    Comment


      #3
      Thanks Jim, it´s clear to me now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X