Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need some help

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

    Need some help

    189: error System.NullReferenceException: Object reference not set to an instance of an object.
    at NinjaTrader.Data.DataSeries.get_Item(Int32 barsAgo)
    at NinjaTrader.Indicator.IndicatorBase.get_Item(Int32 barsAgo)
    at NinjaTrader.Strategy.SignalBars.OnBarUpdate()

    I got this error. Can someone help me on this?

    #2
    Hello,

    I would be happy to take a look.

    From the error it seems that this may be caused by a DataSeries not being set at Initialize but I could be wrong. Without seeing any code it is hard to say what may be causing it to throw the error.

    Can you please post the section of code where you are getting this error? If you do not wish to post the code publicly then please email me at platformsupport[@]ninjatrader.com and include ticket # 1104242 in the subject.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Thanks for the reply Jesse. I already found the cause of the error. I forgot to initialize the DataSeries that is being used in the OnBarUpdate.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      59 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X