Persistent Error pop-up with indicators

Subject: Persistent error pop-up with indicators

Message: I need help fixing an error pop-up. It triggers every single time I add an indicator, forcing me to close it manually every time, before I can proceed. Thanks in advance.up

POP UP : Error: " Unhandled exception: Objet reference not set to an istance of an objet"

it’s making an error because you have something that is set to null and it’s freaking out about that. For example, if the indicator has something called myHigh, but you failed to give that a value, it could be freaking out about that. Are you using a custom indicator, or something from NinjaTrader? I would try to open a brand new empty chart and add indicators one at a time. That should help eliminate which of the indicators you are using that is giving the error.

1 Like

In one of your indicators, in OnStateChange, in the sections of code that handle either State.SetDefaults or State.Configure, this mistake you will find.

Every time you add an indicator all indicators restart, one or more cause this popup. To determine which one, remove all indicators and add one at a time (and apply) until popup error.

1 Like

And when you figure out which one it is that causes it, look in OnStateChange at State.SetDefaults or State.Configure and there you will find the NRE.