Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opening Range Breakout

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

    #16
    maninjapan,

    Please check your CAT data directly by hand to see if there are missing bars.
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      just looking at the chart now, my session time did go into after hours, which had a number of flat bars in a row(each minute has a bar of some description though) , would that account for the delayed print? Guess I should test it again tomorrow during normal market hours.

      Comment


        #18
        You would need to watch it and evaluate each of your conditions by hand on each bar to figure out what is happening.

        You should also try printing Bars.BarsSinceSession so you can evaluate that by hand as well.
        Josh P.NinjaTrader Customer Service

        Comment


          #19
          Josh, thanks for the tip there, I followed KC through the open today and found out 2 things,
          1) it starts from bar 0, which I didnt realized which accounts for a 1 minute delay from what I expected. 'simple adjustment here)
          2) about halfway through the first 30 bar count, there was a flat bar which was skipped in the bar count in the output window. The bar is on the chart though.....


          KC 12-09 10/16/2009 9:00:00 AM 2879 1.378 1.369
          19
          KC 12-09 10/16/2009 9:02:00 AM 2880 1.378 1.369
          20
          KC 12-09 10/16/2009 9:03:00 AM 2881 1.378 1.369
          21

          This pushed the 30 bar count back a minute further.
          Is there anyway around to stop this from happening?

          Thanks

          Comment


            #20
            If you are printing from no filter it should provide you with the exact same information as seen on a chart. Please reload your script and see the printout again. Then go to your chart and visually track the timestamps shown on the chart.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              I was actually jsut trying to add the DrawText, something is missing from this though right?

              DrawText(CurrentBar.ToString(),0, Bars.BarsSinceSession,Color.Blue);

              Comment


                #22
                The appropriate syntax you should use would be one of the following:

                DrawText(string tag, string text, int barsAgo, double y, Color color)

                DrawText(string tag, bool autoScale, string text, int barsAgo, double y, int yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color backColor, int opacity)
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  I tried the following, but still getting an error, am I using the Bars.BarsSinceSession incorrectly here?

                  DrawText(CurrentBar.ToString(),Bars.BarsSinceSessi on,0,High[0] + (TickSize *3),Color.Blue);

                  Comment


                    #24
                    It needs to be a string. You are passing in an int right now. To make it a string you need to add .ToString() like how you did on CurrentBar.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      ok, got it working ,and figured out my error, that bar IS missing from the ninja chart.
                      I am connected to TWS, and the bar appears to be on TWS chart. Is there any reason for a possible discrepency?

                      Comment


                        #26
                        Sounds like a break in your data feed to me. You could try right clicking on the chart and selecting Reload Historical Data.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Bingo!! the missing bar is there.... This could cause me some headaches though, if it happens on a regular basis...
                          Would changing to a longer bar (5 minutes etc) and adjust the bar count accordingly, affect the strategy in anyway?

                          Comment


                            #28
                            Should be fine.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              WEll Thankyou very much for your help on tihs Jason, looks like I might just get there!!

                              Comment


                                #30
                                I seem to have sorted out all the major issues with the strategy except for 1 last one. Im running the exit on close (30 seconds) but find that if the signal is still valid it jumps straight back in again. Is there a simple condition to add to my entries to stop this from occuring? I would like it to trade up to near the close, but perhaps stop new entries just before the exit on close kicks in or no new orders once exit on close has closed a position

                                Thanks,

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                671 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                379 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                111 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                575 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                582 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X