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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      24 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      20 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      14 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      11 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      41 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X