Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    Comment


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by frslvr, 04-11-2024, 07:26 AM
      6 responses
      106 views
      1 like
      Last Post NinjaTrader_BrandonH  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      6 responses
      26 views
      0 likes
      Last Post trilliantrader  
      Started by arvidvanstaey, Yesterday, 02:19 PM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by Rapine Heihei, Yesterday, 08:25 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Mongo, Yesterday, 11:05 AM
      6 responses
      27 views
      0 likes
      Last Post Mongo
      by Mongo
       
      Working...
      X