Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamic Multiple Time Frames?

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

    Dynamic Multiple Time Frames?

    Hi, I'm trying to create a multiple time frame dynamically. Essentially what I want to do is, depending on the current time frame of the chart, I would like to create a second time frame say 5 times the current one which is a 3 minute chart.

    In the initialize method, I have Add(BarsPeriod.Id, 5 * BarsPeriod.Value);
    I have also tried to pull out that multiplication and have it done prior to passing it into the Add function, but when I print out in BarsInProgress == 1, I call the function
    Print(BarsArray[1].Period) and it shows up as 5.

    Is it possible to dynamically change the value for Add or do I have to pass in a constant?

    Any help appreciated.

    #2
    Unfortunately you cannot access BarsPeriod from within the Initialize() method. This means you will not be able to dynamically load bar objects.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Unfortunately you cannot access BarsPeriod from within the Initialize() method. This means you will not be able to dynamically load bar objects.
      Hi Josh,

      Could a request to include some sort of method to get the time frame be included on the "to do" list? This is really a very basic need , considering that NT offers support for multiple time frames. Similar need appears to be obvious for querying an instrument on the chart. Without it is really impossible to write a strategy (or an indicator) that would be flexible enough to be considered universally usefull. Most of us are (or are trying to be) traders, not programmers, so less time we spend on code development the better... Your assistance will be trully appreciated.


      Roman

      Comment


        #4
        Thanks for your suggestion. We'll add it to the list of future considerations.

        Comment

        Latest Posts

        Collapse

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