Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest using multiple timeframes to calculate indicator of bar still forming

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

    Backtest using multiple timeframes to calculate indicator of bar still forming

    My strategy runs on 5 min bars, in real time live environment. It calculates indicators based on each incoming tick, ie. calculateonbarclose=false.

    I need historical backtest to mimics this behavior as much as possible. Is there way to achieve this using 1 min and 5 min bars, and have onbarupdate routine evaluate the 5 min bar indicators still in formation, based on the complete of each 1 min bar?

    eg. at the complete of 9:01am, 9:02am, ...9:05am 1 min bars, program to calculate the forming 9:05am 5 min bar indicators. And if a partially formed 5 min bar at 9:03am triggers an entry condition, then a position is entered at 9:03, instead of 9:05.

    #2
    You can add secondary bars to your strategy. If you need a high granularity you can add small period tick bars, otherwise 1-minute bars should do.

    You can also tweak your 5-minute bar indicators and calculate them directly from 1-minute bars.

    Comment


      #3
      Hello yubo27,

      Thank you for your post and thanks to Harry for answering.

      In addition, please see the link below on Intrabar Granularity from our forum reference samples.
      http://www.ninjatrader.com/support/f...ead.php?t=6652

      Let me know if I can be of further assistance.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        How can "tweaking 5-minute bar indicators" be done?

        My goal is to submit order at eg. 9:03am based on partially forming 5 min bar indicator value at that time.

        Comment


          #5
          Originally posted by yubo27 View Post
          How can "tweaking 5-minute bar indicators" be done?

          My goal is to submit order at eg. 9:03am based on partially forming 5 min bar indicator value at that time.
          Depends on the indicator. Which indicator do you use?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X