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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    154 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    306 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    176 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X