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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      56 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      75 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      39 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      101 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      60 views
      0 likes
      Last Post PaulMohn  
      Working...
      X