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

Nt8 debugger problem

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

    Nt8 debugger problem

    regarding my first attempt to use debugging ...
    i am trying to do nt8 ninjascript debugging with non-real data [it's the weekend]

    when i am connected to simulated data feed in nt8 and am in visual studio attempting to attach ninjascript editor code the attachment i need does not appear in the ''attach to process'' window. see first attachment below.

    when i am connected to ninja continuum feed in nt8 and am in visual studio the ninjascript editor code does appear in the ''attach to process'' window. however, when i start debugging, the message displayed in the second attachment below is displayed.

    i have an enabled strategy attached to a ninjatrader chart because my understanding is [per a platform support team member] that is how i get the price data fed to the visual studio debugger. the odds that i misunderstand are high.


    Click image for larger version

Name:	DEC4 attach to trash not there.jpg
Views:	1
Size:	308.9 KB
ID:	906657

    Click image for larger version

Name:	DEC4.jpg
Views:	2
Size:	90.1 KB
ID:	906658
    Last edited by joemiller; 12-04-2016, 12:09 PM.

    #2
    Hello joemiller,

    Attaching the Visual Studio debugger to NinjaTrader.exe will allow any errors to be caught by the Visual Studio debugger. I'm not aware that this will provide historical or real-time data to Visual Studio or how this data would be received by Visual Studio.

    May I confirm you are attaching to the NinjaTrader.exe process?

    Is debug mode enabled in the NinjaScript editor?

    Below is a link to the help guide on using Visual Studio for debugging.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello joemiller,

      Attaching the Visual Studio debugger to NinjaTrader.exe will allow any errors to be caught by the Visual Studio debugger. I'm not aware that this will provide historical or real-time data to Visual Studio or how this data would be received by Visual Studio.

      May I confirm you are attaching to the NinjaTrader.exe process?

      Is debug mode enabled in the NinjaScript editor?

      Below is a link to the help guide on using Visual Studio for debugging.
      http://ninjatrader.com/support/helpG..._debugging.htm

      Q] May I confirm you are attaching to the NinjaTrader.exe process?
      A] yes i think so ... see attachments.
      notice that in one case ninjatrader.exe is ''trend''
      and in the other case ninjatrader.exe is the name of the strategy being edited by ninja.

      ''attach to process'' window when connected to ''simulated data feed''
      Click image for larger version

Name:	DEC4 when connected to ''simulated data feed'' .jpg
Views:	1
Size:	313.8 KB
ID:	881333
      ''attach to process'' window when connected to ''NinjaContinuum''
      Click image for larger version

Name:	DEC4 when connected to ''NinjaContinuun''.jpg
Views:	1
Size:	311.2 KB
ID:	881334

      Q] Is debug mode enabled in the NinjaScript editor?
      A] yes

      Re: help guide link
      thanks. i have the 4 steps memorized by now

      if it would help to do so, please remotely logon to my computer to investigate.
      Last edited by joemiller; 12-04-2016, 03:33 PM.

      Comment


        #4
        Hello joemiller,

        In both screenshots I am seeing the NinjaTrader.exe process.

        It doesn't matter if you are connected or not, that process is showing in the list.

        Do you have the NinjaTrader project open in Visual Studio?
        (Did you start Visual Studio by clicking the Visual Studio icon on the NinjaScript Editor?)

        Due to a limited staff and other obligations, we are unable to make calls outside of our normal support hours.

        We are available to contact you any time from 8:30 AM Eastern until 6:00 PM Eastern, Monday through Friday.

        If you would like to schedule a call, please send an email to platformsupport [at] ninjatrader [dot] com.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          you] In both screenshots I am seeing the NinjaTrader.exe process.
          me] notice that in one case ninjatrader.exe is ''trend''
          and in the other case ninjatrader.exe is the name of the strategy being edited by ninja.

          you] It doesn't matter if you are connected or not, that process is showing in the list.
          me] ?????

          you] Do you have the NinjaTrader project open in Visual Studio?
          (Did you start Visual Studio by clicking the Visual Studio icon on the NinjaScript Editor?)
          me] yes

          you] Due to a limited staff and other obligations, we are unable to make calls outside of our normal support hours.
          We are available to contact you any time from 8:30 AM Eastern until 6:00 PM Eastern,
          If you would like to schedule a call, please send an email to platformsupport [at] ninjatrader [dot] com. Monday through Friday.
          me] i completely understand. i am surprised and pleased that you are helping me on the weekend.

          Comment


            #6
            how does the debugger get it's input for every time it calls ''onbarupdate''?

            Comment


              #7
              Hello joemiller,

              The debugger is a debugger. This is not processing the data in the script or running the logic.A debugger catches errors and provides further information about the error when debugging.

              The process is called NinjaTrader.exe as shown in step 4 of the help guide. (you can ignore everything else on that line)
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                it is true, is it not, that in any and all cases i must have the strategy i am debugging applied to a ninja chart and enabled?

                Comment


                  #9
                  Hello joemiller,

                  Running the script is required to actually debug, but it is not required to run the script to attach the debugger to the NinjaTrader process.

                  So to have the script you are debugging actively debugged this does need to be added to the Strategies tab of the Control Center and enabled or enabled on a chart.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_ChelseaB View Post
                    Hello joemiller,

                    Running the script is required to actually debug, but it is not required to run the script to attach the debugger to the NinjaTrader process.

                    So to have the script you are debugging actively debugged this does need to be added to the Strategies tab of the Control Center and enabled or enabled on a chart.
                    thanks chelsea,

                    so when the market is open and we are getting realtime prices, if a breakpoint is set at the first instruction in onbarupdate then, when that breakpoint is hit, will execution be stopped and the chart cease to update??? and if so, when debugger continue occurs will the chart be fully updated? or maybe ''reload all historical data'' somehow comes into play??? all of this may make no sense. it is merely an attempt to understand a few basics of the debugger logic.

                    Comment


                      #11
                      in other words, i understand how program execution can be stopped at a breakpoint when program input is not real-time [e.g.] when input is a request for radius when calculating the area of a circle ... but what happens when input is out of my control? it will keep on coming and be lost, until i resume program execution [unless maybe all that streaming data that is piling up at the breakpoint door is somehow captured and then fed non real-time to the breakpoint, which sounds very complicated] ?

                      Comment


                        #12
                        visual studio window which attaches ninja strategy code to the visual
                        studio debugger.
                        Click image for larger version

Name:	DEC51 in visual studio, attaching to ninja strategy code.JPG
Views:	1
Size:	317.0 KB
ID:	881338

                        initial screen when visual studio debugging screen window appears.
                        debugging has been already automatically started [red circle] and i
                        have set a breakpoint [red ellippse]. nothing is happening so i stopped
                        debugging by clicking on the orange square in the red circle. then i
                        restarted by clicking on a start icon which appeared after stopping
                        the debugger.
                        Click image for larger version

Name:	DEC52 in visual studio, degugging already started & breakpoint set.JPG
Views:	1
Size:	649.7 KB
ID:	881339

                        error message window which popped up after restarting.
                        Click image for larger version

Name:	DEC53 in visual studiio, error msg after debugging stopped & started.JPG
Views:	2
Size:	90.1 KB
ID:	881340

                        Comment


                          #13
                          Originally posted by joemiller View Post
                          visual studio window which attaches ninja strategy code to the visual
                          studio debugger.
                          [ATTACH]41644[/ATTACH]

                          initial screen when visual studio debugging screen window appears.
                          debugging has been already automatically started [red circle] and i
                          have set a breakpoint [red ellippse]. nothing is happening so i stopped
                          debugging by clicking on the orange square in the red circle. then i
                          restarted by clicking on a start icon which appeared after stopping
                          the debugger.
                          [ATTACH]41645[/ATTACH]

                          error message window which popped up after restarting.
                          [ATTACH]41646[/ATTACH]
                          i understand that this may be a visual studio problem for which ninja cannot
                          provide help/support ... but first it must be determined that i am not doing
                          something wrong on the ninja side.

                          Comment


                            #14
                            Hello joemiller,

                            That is correct. Using Visual Studio is outside of the realm of what is supported by NinjaTrader Platform Support.

                            I am able to remote and assist with using the NinjaScript Editor window, but not with Visual Studio.

                            However, I wanted to make a short video to demonstrate.


                            I would recommend that you try use a clean NinjaTrader settings folder and try the steps in the video and see if you can get the debugger attached.

                            Then add the scripts you are using back and try attaching again.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              i watched the video multiple times. as far as i can tell i am doing everything exactly right.
                              before i try to get help from the microcoft visual studio team ... please remotely logon to my computer to see if you agree that i am doing everything correctly.
                              in the meantime i will immediately send an email to platform support with my phone number.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by giulyko00, Today, 12:03 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post giulyko00  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              12 responses
                              213 views
                              0 likes
                              Last Post DrakeiJosh  
                              Started by cre8able, 02-11-2023, 05:43 PM
                              3 responses
                              238 views
                              0 likes
                              Last Post rhubear
                              by rhubear
                               
                              Started by frslvr, 04-11-2024, 07:26 AM
                              8 responses
                              117 views
                              1 like
                              Last Post NinjaTrader_BrandonH  
                              Started by stafe, 04-15-2024, 08:34 PM
                              10 responses
                              47 views
                              0 likes
                              Last Post stafe
                              by stafe
                               
                              Working...
                              X