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 alifarahani, Today, 09:40 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by RookieTrader, Today, 09:37 AM
        4 responses
        17 views
        0 likes
        Last Post RookieTrader  
        Started by PaulMohn, Today, 12:36 PM
        0 responses
        4 views
        0 likes
        Last Post PaulMohn  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        39 views
        0 likes
        Last Post love2code2trade  
        Started by junkone, Today, 11:37 AM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X