Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debug?

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

    #16
    MANY. I'm running it on a 1-minute ES chart on NT7.

    Originally posted by NinjaTrader_Josh View Post
    jonmoron,

    How many bars are on the chart you are trying to run the strategy on?

    Comment


      #17
      Jon,

      It sounds to me like you may have something corrupt with your NinjaTrader. I suggest you do a 100% clean reinstall.

      1. Uninstall NT6.5
      2. Delete My Documents\NinjaTrader 6.5 directory (backup anything you want to save before doing this)
      3. Clear internet browser cache
      4. Download NT6.5, reinstall
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Josh,

        I just did a clean install earlier today. I suspect I might know what might be causing this. My bars aren't updating on the chart, but my SuperDOM is ticking away.How is this possible?

        thanks!

        Originally posted by NinjaTrader_Josh View Post
        Jon,

        It sounds to me like you may have something corrupt with your NinjaTrader. I suggest you do a 100% clean reinstall.

        1. Uninstall NT6.5
        2. Delete My Documents\NinjaTrader 6.5 directory (backup anything you want to save before doing this)
        3. Clear internet browser cache
        4. Download NT6.5, reinstall

        Comment


          #19
          Jon,

          Check your chart properties' session begin/end times.

          OnBarUpdate() should be processing for all historical bars too so it doesn't matter if the data is rolling real-time or not. You should still get a print. Only exception to this case is if in your code you added

          Code:
          if (Historical)
               return;
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            That was it. When I selected the product I reset the "Session Template" to CME Index Futures ETH (not sure what ETH/RTH mean). Now I have an updating chart. However, this is the code I have in the SampleCancelOrder:

            protected override void OnBarUpdate()
            {
            Print("in OnBarUpdate");
            // Return if there aren't enough loaded bars
            if (CurrentBar < 1)
            return;

            I have the output window open, but never see "in OnBarUpdate".
            Odd. I was expecting to see it now. Again this is with NT7. How do I modify the instrument's default time?



            Originally posted by NinjaTrader_Josh View Post
            Jon,

            Check your chart properties' session begin/end times.

            OnBarUpdate() should be processing for all historical bars too so it doesn't matter if the data is rolling real-time or not. You should still get a print. Only exception to this case is if in your code you added

            Code:
            if (Historical)
                 return;

            Comment


              #21
              You change session templates used in the Instrument Manager for the instrument in question. Be sure you actually compiled the code and not just Saved it. Then be sure you add a new instance of the strategy.
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                Nevermind my last question. I figured out how to change it from RTH to ETH. (What do those letter mean anyways)? I still have the problem of an updating chart but OnBarUpdate not getting called at all.

                Comment


                  #23
                  Thanks for the update, JON.

                  Those letters refering to Regular Trading Hours and Extended Trading Hours.
                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #24
                    RyanM,

                    Thanks for the 411. Any insight on why OnBarUpdate isn't being called at all?

                    thanks!


                    PS. By the way, your customer service is unbelievable! I don't say/type it NEARLY as much as I think it.

                    Originally posted by NinjaTrader_RyanM View Post
                    Thanks for the update, JON.

                    Those letters refering to Regular Trading Hours and Extended Trading Hours.

                    Comment


                      #25
                      Now I'm having a weird occurrence. I closed NT7 and opened it up again.
                      I then loaded an ES chart and selected my customized (added print()) SampleCancelOrder. The output window printed this immediately:

                      inside Initialize


                      The odd thing is that that line is being printed in my custom strategy and not the SampleCancelOrder. How is this possible? Do all NT strategies get loaded in runtime when I open up the Strategies dialog box?

                      Comment


                        #26
                        Doh! I think I figured it out. I have to manually 'Enable' the strategy before adding it to the chart. I get the OnBarUpdates to print for the SampleCancelOrder. On to my custom strategy now.


                        THANKS to josh and ryanm!

                        jon

                        Comment


                          #27
                          Great to hear, Jon! Thanks for letting us know.
                          Ryan M.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          649 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          370 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          109 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          573 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          576 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X