Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Problems with SubmitChartTraderATMTest.cs With Null Reference

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

    Problems with SubmitChartTraderATMTest.cs With Null Reference

    I am trying to do work with the SubmitChartTraderATMTest.cs file. I'm running it with Playback and the problem I'm having is when I first load the indicator and have VS running and in Debug mode, when the bars get to Real Time I get an Exception Thrown.
    $exception {"Object reference not set to an instance of an object."} System.NullReferenceException

    If I go past this error, the playback runs but no "StopOrders" are placed.

    Any help would be appreciated...
    taddypole...

    Attached Files

    #2
    Hello taddypole,

    The error means you have a variable with a null value.

    What line of code is causing the error?
    (Add prints above each line if you are unsure. The last print to appear will be above the line causing the error.)

    The Account variable named Account is ambiguous. I would advice using a lower case A or changing the variable name all together.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you ChelseaB,

      I found the problem. When applying this indicator I didn't realize I needed to change the account to "Playback101" instead of Sim101 in the settings.
      I thought the indicator would pick the account automatically by what was selected in Chart Trader but I see it doesn't.

      You pointed my in the right direction....

      Again... thanks..

      taddypole...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rdtdale, Yesterday, 01:02 PM
      2 responses
      15 views
      0 likes
      Last Post rdtdale
      by rdtdale
       
      Started by TradeSaber, Today, 07:18 AM
      0 responses
      7 views
      0 likes
      Last Post TradeSaber  
      Started by PaulMohn, Today, 05:00 AM
      0 responses
      9 views
      0 likes
      Last Post PaulMohn  
      Started by ZenCortexAuCost, Today, 04:24 AM
      0 responses
      6 views
      0 likes
      Last Post ZenCortexAuCost  
      Started by ZenCortexAuCost, Today, 04:22 AM
      0 responses
      3 views
      0 likes
      Last Post ZenCortexAuCost  
      Working...
      X