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

using IDE to debug

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

    using IDE to debug

    Hi

    I am new to programming and NT - but learning fast.
    One of the things that help me to learn programming is the ability to "step through the code"
    With step through I mean one can watch as the values in the variables change and can see what if statements for example are executed and which are skipped

    Does the NT editor provide the ability to do this? - or rather what program can I use to do this.

    I see in the release notes that NT 6.5 now have "Added: Microsoft Visual Studio debugging support" - but then I have also read somewhere that the express version is not supported.

    Will the "debug mode" work with SharpDevelop ( a free C# IDE)? If it doesn't please add it to the list of to dos

    TIA

    #2
    Debugging is only supported in MS Visual Studio, the paid version.

    Welcome to NinjaScript programming by the way
    RayNinjaTrader Customer Service

    Comment


      #3
      So has SharpDeveloper been added to the list of to dos?

      Originally posted by NinjaTrader_Ray View Post
      Debugging is only supported in MS Visual Studio, the paid version.

      Welcome to NinjaScript programming by the way

      Thank you for the welcome.

      Back to my questions:
      Has SharpDeveloper for debugging been added to the list of to dos?
      After doing more research I see that NT generally recommend to use the print command to see what is happening in the code - is that correct? If I do not have the expense Visual Studio is that the only thing I can do?

      Comment


        #4
        NT does not support SharDevelop at that time. Thanks for your suggestion. We'll add it to the list of future considerations.

        Comment


          #5
          So I should use print?

          Originally posted by NinjaTrader_Dierk View Post
          NT does not support SharDevelop at that time. Thanks for your suggestion. We'll add it to the list of future considerations.
          Thanks Dierk

          Please have a look at my second question as well.
          Basically - the only thing I can do is to use the print command to determine the value of variables and what branches of the code is executed when it runs?

          I am trying to confirm that I am not missing something that will help me do the above

          Comment


            #6
            >> that NT generally recommend to use the print command to see what is happening in the code - is that correct?
            Correct

            Comment


              #7
              Please provide info on how to use print()

              Originally posted by NinjaTrader_Dierk View Post
              >> that NT generally recommend to use the print command to see what is happening in the code - is that correct?
              Correct

              I have searched for more information on how to use Print() to do the following:

              I want to print the following values to the output window:
              high,low,close, value of a variable

              I know this could be done with Print High[0] and print low[0] etc.
              The thing is I want them to display in line next to each other - in columns - not in one long column as it does now

              Please provide a sample of how this could be done AND show me where this is covered in the help file/videos so that I can search better in future

              Comment


                #8
                Unfortunately there is not such sample available at that time. I suggest consulting the standard MS documents on .NET string formatting.

                Comment


                  #9
                  Originally posted by NinjaTrader_Ray View Post
                  Debugging is only supported in MS Visual Studio, the paid version.

                  Welcome to NinjaScript programming by the way
                  I too am new to the software, but have some background in programming - if using visual studio to debug a strategy, will it be able to access the price data either from market replay or historical data (for backtesting)? And then will you be able to check each variable bar-by-bar?

                  The reason I ask is that I have some code that I think should lead to a certain action on a chart, but it is not for one reason or another, and i'd love to see which "if statement" or which variable is causing the problem.

                  Thanks in advance to anyone who has any experience using Visual Studio or who has done this type of thing

                  Comment


                    #10
                    Yes and yes.
                    RayNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by verge View Post
                      I know this could be done with Print High[0] and print low[0] etc.
                      The thing is I want them to display in line next to each other - in columns - not in one long column as it does now
                      Its just a matter of putting them in the same Print() with a space, ie Print(High[0] + " " + Low[0]) ect.

                      Comment


                        #12
                        This gives a little more flexibility:

                        Code:
                        Print( String.Format( "High={0} Low={1} Open={2} Close={3}",
                                               High[0], Low[0], Open[0], Close[0]
                                            )
                             );

                        Comment


                          #13
                          Thank you darthtrader and KBJ

                          Originally posted by KBJ View Post
                          This gives a little more flexibility:

                          Code:
                          Print( String.Format( "High={0} Low={1} Open={2} Close={3}",
                                                 High[0], Low[0], Open[0], Close[0]
                                              )
                               );
                          Regards

                          Verge

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by GLFX005, Today, 03:23 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post GLFX005
                          by GLFX005
                           
                          Started by XXtrader, Yesterday, 11:30 PM
                          2 responses
                          11 views
                          0 likes
                          Last Post XXtrader  
                          Started by Waxavi, Today, 02:10 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post Waxavi
                          by Waxavi
                           
                          Started by TradeForge, Today, 02:09 AM
                          0 responses
                          14 views
                          0 likes
                          Last Post TradeForge  
                          Started by Waxavi, Today, 02:00 AM
                          0 responses
                          3 views
                          0 likes
                          Last Post Waxavi
                          by Waxavi
                           
                          Working...
                          X