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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X