Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-TimeFrame in Ver 7

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

    #16
    Hi Ryan,

    Your file was very useful.
    I think I've located the problem in my strategy being the value I assign to the currentBar test. (72000)

    Using 2000 as currentBar value allows me to get a value for 1period ATR.

    If I am using a 1minute strategy that requires at least 50 days lookback to create the ATR50 wouldn't i need at least 24*60*50 minute bars as a minimum?

    Almost there I think..

    Thanks for your patience

    Comment


      #17
      Yes, that's the general idea. You don't want to access the secondary series until enough days have developed. If you're referencing index [0], then this is really only the first days worth of 1 minute bars. In your case 1440 should do it.

      If you have calculations that require a certain number of bars to calculate for the secondary series, you can access this series' CurrentBar value directly with CurrentBars. Adding this check ensures the most accuracy as you will get values for your indicator even if the required # of bars hasn't elapsed.

      if (CurrentBar < 1441 || CurrentBars[1] < 50)
      return;
      Ryan M.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      598 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 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
      557 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