Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    550 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X