Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript generated script not accounting for a change in variables

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

    Ninjascript generated script not accounting for a change in variables

    I have an indicator that when I originally created, I had a few Ninjascript properties that I was using, and I have since removed them.

    I now cannot compile, and I am getting does not contain errors for the old variables I removed.

    I have tried rebuilding the solution in Visual studio, and also compiling in a Ninjascript editor, and nothing is resolving this.

    It says not to remove the Ninjascript generated code, but can I delete it and would it be rebuilt properly?

    I have never had this problem before, it always corrects itself when I either rebuild solution or compile, and this time its not. Any suggestions?

    #2
    Hello ErikY,

    Thanks for your post.

    Did you remove the NinjaScript properties in question from the Properties region of your indicator?

    Did you remove the properties from the State.SetDefaults section of OnStateChange() if they were used there to set a default value for those properties?

    Please run a compile in the NinjaScript Editor window by clicking the compile button and send us a screenshot of your error so that we may accurately assist. Note to make sure that the full error message is seen in the screenshot.
    • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
    I look forward to assisting further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks Brandon, after I posted this question, I shut down Visual Studio and Ninja and came back this morning, opened everything up, and the error messages were gone and it seemed to correct itself. Not sure what happened but I have done that a million times and never had that issue, but now all seems resolved. Thanks for the help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X