Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rayyyu12, Today, 12:47 AM
    0 responses
    3 views
    0 likes
    Last Post rayyyu12  
    Started by ETFVoyageur, 05-07-2024, 07:05 PM
    17 responses
    133 views
    0 likes
    Last Post ETFVoyageur  
    Started by ETFVoyageur, Yesterday, 10:13 PM
    1 response
    9 views
    0 likes
    Last Post ETFVoyageur  
    Started by somethingcomplex, Yesterday, 10:36 PM
    0 responses
    9 views
    0 likes
    Last Post somethingcomplex  
    Started by sofortune, 05-10-2024, 10:28 AM
    5 responses
    22 views
    0 likes
    Last Post sofortune  
    Working...
    X