Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Visual Studio Shows Errors since accidentally added the ninjascript generated code

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

    Visual Studio Shows Errors since accidentally added the ninjascript generated code

    Hey,

    as mentioned in the headline. We copied the complete code from one into another indicator including the do not change or remove part.

    Since than visual Studio generates Errrors, while the Indicators are still working on the Chart.

    It shows something like: There is a type conflict with the inheritance from the indicator

    Thanks in advance!

    Wenkey

    #2
    Hello Wenkey,

    Thank you for the post.

    You can safely delete the NinjaScript generated code if that is the only problem, once you compile from the NinjaScript editor from that indicator it will be regenerated. If you are still getting errors or If you otherwise haven't changed anything after copying the code you likely also have conflicting type errors also. This is because of a duplication of the type or other public items in the script.

    If you were trying to duplicate the file with a new name please do the following:
    1. Delete the file you made which has the errors
    2. Open the NinjaScript editor
    3. Compile and make sure there are no errors
    4. Open the file you want to copy
    5. Right click -> Save as
    6. Give it a new name.
    Once you do that visual studio should prompt you to reload the solution. Always allow it to reload the solution and do not ignore the changes that NinjaTrader makes. It will manage the solution to keep all files tracked and do removals of deleted files etc.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    571 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X