Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi-Series Bars Objects are empty

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

    Multi-Series Bars Objects are empty

    Hi:

    I've got a strategy in a chart who's Primary Bars object is 15min.

    I'm creating additional Bars objects for the Primary instrument using Add().

    I'm creating Daily,15min, and 233 Tick Bars objects.

    I access the non-Primary Bars objects after historical data has been loaded with a Market Replay connection and my historical data has Tick granularity...

    I have valid bars in the Primary Bars object, but all other Bars objects have a count of 0.

    Do additional Bars objects *not* get populated with historical data?
    Also, your documentation states that if you Add() a new Bars object that matches the Primary Bars object, that the primary is re-used to save space.

    Makes sense... except I have a 15min chart and I'm also creating an additional Bars object of 15mins on the Primary instrument, but my Add()'d Bars object has a count of zero... Even if the other Bars objects aren't populating, I would assume that the Add()'d Bars object which matches the Primary would have valid bars in it.

    I should add that I'm accessing the Bars objects directly and explicitly via the BarsArray and *not* from within OnBarUpdate().

    Any help is appreciated.

    Thx
    Last edited by BigWaveDave; 03-11-2013, 09:10 PM.

    #2
    Hi BigWaveDave, can you please clarify what you mean with 'I should add that I'm accessing the Bars objects directly and explicitly via the BarsArray and *not* from within OnBarUpdate().'?

    From which method do you work with them in your script?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Sure... my first Add()'d object is the daily timeframe, the chart happens to be a 15min chart... It's Add()'d inside of Initialize()...

      Later on in my code...

      I have a button in my UI that starts processing of the bars objects so it's not initiated by an OnBarUpdateEvent.

      // It goes something like this...
      Bars DailyBars = BarsArray[1];

      if (DailyBars.count == 0)
      Print("What?");

      Is it possible that I need to use the TriggerCustomEvent mechanism to invoke this processing?

      BTW, the code above using BarsArray[0] works fine for the Primary bars... they're all there and I can access them.

      There is only historical data on the chart. I have a Market Replay connection open, but I haven't started to 'play' it yet in this scenario.

      Thanks for the help.
      Dave

      Comment


        #4
        Thanks Dave - would you see the same issue if you instantiated them with a 'dummy' call in OnBarUpdate()? The primary would always be there as it's your charted main series...
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I'll try it out later today...

          I'm assuming from your questions that those non-primary Bars arrays should be being 'built' from the historical data as it loads...

          Thx.

          Comment


            #6
            Ok, it looks like I got it working...

            I believe it was a weird issue with Historical data loading...

            Once all the stars aligned, it seemed to start working.

            Call it user error, but data loading and market replay seems overly complicated and prone to issues like this. It's nice to have the flexibility, but it's easy to shoot oneself in the foot.

            I hope that things will be more streamlined in NT 8.

            I'm more concerned for my users than I am for myself at this point. As I'm sure you're aware, it means a lot more attention is required to support users.

            Thx,
            Dave

            Comment


              #7
              Thanks for sharing this update and your feedback Dave, I can understand well and will make a note of it in our product management trackings.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by TradeSaber, Today, 07:18 AM
              0 responses
              7 views
              0 likes
              Last Post TradeSaber  
              Started by PaulMohn, Today, 05:00 AM
              0 responses
              9 views
              0 likes
              Last Post PaulMohn  
              Started by ZenCortexAuCost, Today, 04:24 AM
              0 responses
              6 views
              0 likes
              Last Post ZenCortexAuCost  
              Started by ZenCortexAuCost, Today, 04:22 AM
              0 responses
              3 views
              0 likes
              Last Post ZenCortexAuCost  
              Started by SantoshXX, Today, 03:09 AM
              0 responses
              17 views
              0 likes
              Last Post SantoshXX  
              Working...
              X