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.


    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by leojimenezp, Yesterday, 04:04 PM
    3 responses
    34 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Torontobluejays, Yesterday, 08:43 AM
    2 responses
    13 views
    0 likes
    Last Post Torontobluejays  
    Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
    16 responses
    70 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JTorre, 04-28-2024, 08:11 PM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by ageeholdings, Today, 05:22 AM
    3 responses
    21 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X