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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          152 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          305 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          244 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          345 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          176 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X