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

Adding multi-timeframe dataseries - no data loaded

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

    Adding multi-timeframe dataseries - no data loaded

    Hi,

    this has been an ongoing issue for me for some time, and I have posted about it previously.

    My indicator is fairly simply, its just for displaying 5 minute volume data on my range chart. I have narrowed the error down to the condition that BarsArray[1].Count=0.

    I use the following function inside Initialize()

    Add(PeriodType.Minute, 5);

    So now, before attempting to access the volume I have to check the size of the additional data series. At certain times, intermittently, I get BarsArray[1].Count=0. I have not been able to determine exactly what conditions cause this state, but it is possibly related to time of day. When this condition arose again just now (its been in this state for about an hour, on more than 1 different instrument) I reloaded all historical data and reloaded all ninjascript with no change. I restarted NT and then the data appeared. But I have restarted NT several times this morning and it hasn't fixed the problem.

    Can someone help me to track down the cause of this issue?

    thanks,
    will.

    Edit : one other thing that I noticed was that OBU was not called for BarsArray[1] when the chart was reloaded.
    Last edited by dontpanic; 07-03-2014, 06:13 PM.

    #2
    Hi dontpanic,

    Try using Add(Instrument.FullName, PeriodType.Minute, 5);

    Does this correct the issue?

    Where are you printing BarsArray[1].Count? (Don't do this in Initialize(), do this anywhere else though)

    What is the interval/bar type of the primary series?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      so far that change has made a difference but I will check over the next few days to see if the errors return.

      Why does that make a difference?

      Thanks,
      Will.

      Comment


        #4
        Hi dontpanic,

        Add with an instrument requires 3 overload parameters.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi chelsea,

          my question was more to understand WHY the extra parameter makes a difference. If you dont call with that parameter, what is the difference?

          Will.

          Comment


            #6
            Hi Will,

            I see your point. Two overload parameters should be correct and should return the primary instrument.

            What are the differences you are seeing?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              can I forward you some further information including a log and my indicator source via email? I'm still having problems and unable to identify what is happening.

              Thanks,
              Will

              Comment


                #8
                Hi Will,

                Yes, send an email to platformsupport [at] ninjatrader [dot] com.

                In the email please include a link to this thread.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by selu72, Today, 02:01 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Zachary  
                Started by WHICKED, Today, 02:02 PM
                2 responses
                12 views
                0 likes
                Last Post WHICKED
                by WHICKED
                 
                Started by f.saeidi, Today, 12:14 PM
                8 responses
                21 views
                0 likes
                Last Post f.saeidi  
                Started by Mikey_, 03-23-2024, 05:59 PM
                3 responses
                51 views
                0 likes
                Last Post Sam2515
                by Sam2515
                 
                Started by Russ Moreland, Today, 12:54 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X