Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing multi-time frame data

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

    Accessing multi-time frame data

    I'm trying to develop an indicator (later using the same data structures in a strategy) that reads in both the last and ask data. I've learned to load both into my chart within the data series and overlay them so I can see them together. Now I'd like to access them within my indicator (strategy). But when I read about BarsArray, it says it can only access the data if I use AddDataSeries(). Is that true or can I access the data like Opens[index]?

    Secondly when I read about the BarsArray it says I can only access one at a time in separate iterations in OnBarUpdate(). But I want them all at the same time. Is that possible? I need to pass both the last and ask PriceSeries data to one of my addOns concurrently. Is this possible?

    #2
    Hello dweems,

    Yes you need to use AddDataSeries to be able to use the Opens or other plural multi series.

    To access all the timeframes at once you need to use the Plural series like Opens[1][0] that would be for the second series. OnBarUpdate is only called for 1 BarsArray at a time, that is the BarsInProgress property which denotes the series that called OnBarUpdate.

    Passing data to an addon is not something the platform has specific features for, that highly depends on what you mean by addon.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    40 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    27 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X