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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    43 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    26 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    163 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    158 views
    2 likes
    Last Post CaptainJack  
    Working...
    X