Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Objective Optimizer Problems

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

    Multi Objective Optimizer Problems


    NT Support Dudes:


    When I attempt a Multi Objective Optimizer run, I get "Error on calling 'OnStateChange' method: Object reference not set to an instance of the object." When I run the same strategy through the Optimizer, no problem. Googling this issue, there's all sorts of ways this error can occur, and possible resolutions as well.

    Your thoughts on how to resolve? Thanks,


    #2
    Hello timmbbo,

    Thank you for your post.

    The error message "Object reference not set to the instance of an object" means that something in the script is returning null at the time you are accessing it. Debugging using prints would be necessary to determine what exactly is returning null in the script. Below is a Help Guide page that explains in detail.



    Are you perhaps calling AddDataSeries() dynamically in the script? Where / how are your strategy's properties defined in OnStateChange()?

    Please let us know if you need further assistance.

    Comment


      #3

      Gaby, thanks. I was eventually able to isolate the section of code causing grief, and IsInStrategyAnalyzer to leave it out of a run.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X