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

Understanding AddDataSeries

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

    Understanding AddDataSeries

    I created some logic to read from a 10 minute chart and display on a volume 1000 chart.


    else if (State == State.Configure)
    {

    AddDataSeries(Data.BarsPeriodType.Minute, 10);

    }


    OnbarUpdate


    if (BarsInProgress == 1)
    {
    //do my calcuations
    }

    Now this is my error

    2018-04-22 21:46:17:047 Cbi.Instrument.RequestBars (to Provider): instrument='NQ 06-18' from='4/22/2018 12:00:00 AM' to='4/22/2018 12:00:00 AM' period='1 Minute'
    2018-04-22 21:46:17:828 ERROR: Indicator 'MyIndicator': Error on calling 'OnBarUpdate' method on bar 7097: Object reference not set to an instance of an object.

    How can this be on a 1000 volume chart AND the add data series is 10 minutes?
    If I change the Dataseries to 15 minues, 30 minutes or 60 minutes it will work.

    #2
    Hello ballboy11,

    Thank you for your note.

    If you open a NQ ##-## volume chart and right click on the chart>Data Series and set bars to load to 50, OK. How far is the chart built back? For example March 1 2018.

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    0 views
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    2 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,262 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X