Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Opening 30 min. bar breakout strategy

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

    Opening 30 min. bar breakout strategy

    I would like a strategy based on a one tick breakout above or below the first daily session 30 min. bar high and low for a long and short trade respectively. I do not know how to structure this. Could someone please show me how or where I could get this strategy? Thanks.

    #2
    Hello fhege,

    Welcome to the NinjaTrader forums!

    Yes, we have a sample available for this. You can download from here and import into your NinjaTrader installation:

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi

      Im new to Ninjatrader, understand markets well but just now trying to get a better grasp of implementing 'custom' stategies like the one you have kindly provided.

      I have downloaded this strategy, opened it in the custom strategies tool and saved it as a ninjascript strategy. Unfortunately, when i use the strategy analyzer, I cannot select it from the list of dropdown strategies. I can however see it on the left hand side folder view when expanding 'strategies'. I have not modified the code in any way. Just trying to test out anythint to understand the product further.

      I have provided a screenshot.

      Thanks for your time!
      Attached Files

      Comment


        #4
        Hi smegey,

        Thanks for the post and welcome to the NinjaTrader forums. You should not have to manually open this file and place in strategy folder To bring this into your platform, you can use File > Utilities > Import NinjaScript > Select the zip file.

        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks so much RyanM. Ill give this a shot when i next get in front of my trade computer.

          Comment


            #6
            Breakout strategy question

            Not sure if this is the correct place to post such a question but I am wondering if anyone knows how to change this strategy a little so that the range of the 30 minute candle excludes the wicks? Only trades the breakout of the body of the candle. Could anyone help?
            Thank You

            Comment


              #7
              Hello c4matted,

              Thanks for the post and welcome to the NinjaTrader forums! If you want to exclude wicks for your breakout strategy, you would have to work with Open and Close instead of High and Low. To find which is higher/lower for Open and Close there are methods Math.Min() and Math.Max().
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                Breakout strategy question

                Ryan,
                I appreciate the information. Definitely something I am interested in. Would you know of any documentation or the best way for someone that is new to Ninjatrader to start building an automated strategy or a strategy for backtesting? Is there tools within Ninjatrader to help me modify the current breakout strategy? Thank You again

                Comment


                  #9
                  Yes, you can build from existing samples and is a good way to get familiar with acceptable code syntax. For an introduction to strategy development in NinjaTrader, please see following link:


                  To make copies of any existing strategies: Right Click in editor > Save as and provide a new name.
                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #10
                    First Bar of Session

                    Hi All,

                    I'm new to NinjaTrader and this is my first post on the forum. Please have patience with me.

                    I have a question about the Bars.FirstBarOfSession function. When dealing with the ES, which practically trades around the clock, does the system consider the start of the session the 9:30 USA market open? Is the overnight session ignored?

                    Thank you in advance for your responses!

                    Comment


                      #11
                      Hello GeoOrtiz,
                      Welcome to the forum and I am happy to assist you.

                      It would depend on the session template you are using. If you are using an RTH session template then only the FirstBarOfSession will return the bar number @ 9:30.

                      JoydeepNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by c4matted View Post
                        Not sure if this is the correct place to post such a question but I am wondering if anyone knows how to change this strategy a little so that the range of the 30 minute candle excludes the wicks? Only trades the breakout of the body of the candle. Could anyone help?
                        Thank You
                        Replace the trigger, High[0], with Math.Max(Open[0], Close[0]) and Low[0] with Math.Min(Open[0], Close[0]).

                        Comment


                          #13
                          Hi All,

                          I downloaded and ran this sample strategy on one day (01/17/13) on ES, but it is calculating the wrong highest high of the first 30 min of trading. Am I running the backtest incorrectly?
                          Attached Files
                          Last edited by GeoOrtiz; 01-22-2013, 11:00 AM.

                          Comment


                            #14
                            Hello GeoOrtiz,
                            If you set the Min bars required to 0, or better backtest the strategy with 2 days or more data then are you getting the correct fills.
                            JoydeepNinjaTrader Customer Service

                            Comment


                              #15
                              Thank you Joydeep. That did the trick.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by kevinenergy, 02-17-2023, 12:42 PM
                              115 responses
                              2,699 views
                              1 like
                              Last Post kevinenergy  
                              Started by prdecast, Today, 06:07 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by Christopher_R, Today, 12:29 AM
                              1 response
                              14 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by chartchart, 05-19-2021, 04:14 PM
                              3 responses
                              577 views
                              1 like
                              Last Post NinjaTrader_Gaby  
                              Started by bsbisme, Yesterday, 02:08 PM
                              1 response
                              15 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X