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

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

    Visual Studio

    Hi,

    I have been using Visual Studio to edit and debug an indicator. I split the main cs file and stored some classes as partial class files. So I have the main indicator file say Ind.cs and class files Ind.class1.cs and Ind.class2.cs.

    When I go back to edit files using NT I can see the class1 and class2 files, but the main file is excluded from compilation. The code is the original code prior to splitting out the classes.

    In VS the files appear to be correct, but debugging no longer works. I can't set a break point. The indicator works, but I need to debug using VS.

    Where is my updated indicator file? What can I do to fix the degugging issue? Is splitting class files supported?

    Thanks

    Ian

    #2
    Hello IanC28,

    This may be how you split the file or because of some set of actions you did in visual studio. Did you do any of creating files or splitting in Visual Studio or did you create the files and split the code in the NinjaScript editor? Any changes you make to the overall project need to be done in the NinjaScript editor, if you make any changes to the files such as renaming or moving them it may not be correctly reflected in the platform. Visual studio really just works as a text editor in this use case.

    Very likely you will need to include or make whatever changes are needed from the NinjaScript editor and then compile from there to update the visual studio solution.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      I used VS to split the files.

      Is there guidance on how to do this in NT. Or do you just create 3 files with partial class qualifiers?

      Thanks

      Ian

      Comment


        #4
        Hello IanC2,

        You would just use the editor to make any new files needed and move the code as you need. You can right click on any of the folders in the editor to generate a new file in that folder. After the files are generated and you compile you could move back to visual studio and do any editing you need, its mainly just the file creation or renaming you need to make sure to do in the editor. The editor generates the visual studio project file so if you add things to it outside of the platform it wont know about that.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Barry Milan, Today, 10:35 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by WeyldFalcon, 12-10-2020, 06:48 PM
        14 responses
        1,428 views
        0 likes
        Last Post Handclap0241  
        Started by DJ888, Yesterday, 06:09 PM
        2 responses
        9 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        40 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Today, 08:51 AM
        2 responses
        16 views
        0 likes
        Last Post bill2023  
        Working...
        X