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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X