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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      72 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X