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

Break out

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

    Break out

    I have tried to set buy/sell stop orders just outside the high/low of the previous bar, the most basic of breakout strategies, using the wizard.

    I have Position.MarketPosition == MarketPosition.Flat for both entries with the entries as follows.

    EnterShortStop(DefaultQuantity,Low[0]+-1*TickSize,"")

    EnterLongStop(DefaultQuantity,High[0]+1*TickSize,"")

    The exits are just 2 ticks each way.

    When I test each entry by themselves they worked fine. However when I put them together, only one order would be active at a time. I was expecting to see both up at the same time.
    Is this beyond the scope of the Wizard, or am I jsut not doing it correctly?

    Thanks
    Last edited by maninjapan; 05-13-2008, 06:27 AM.

    #2
    Please check out the "Entries per direction" parameter on the strategy properties dialog.

    Comment


      #3
      My apologies I pasted the same entry twice, entries should read as follows


      EnterShortStop(DefaultQuantity,Low[0]+-1*TickSize,"")

      EnterLongStop(DefaultQuantity,High[0]+1*TickSize,"")

      So I should have a buy stop, and a short stop appear at the same time,

      Comment


        #4
        You can't go long and short in the same strategy at the same time.

        Comment


          #5
          Not even just placing the orders?? I thought that was the essence of a breakout strategy, placing a buy/sell stop order either side of the high/low. Im not actually looking to take a position both ways just place the breakout orders. If Im not able to do that, then my next question I guess is how would I go about coding a 2 bar breakout strategy?

          Your help is much appreciated.
          Last edited by maninjapan; 05-13-2008, 08:01 AM.

          Comment


            #6
            You can't place orders on both sides of the market. You could monitor the market (check Close[0] value) on trigger orders as needed.

            Comment


              #7
              6.0

              I have been testing a strategy that was written for v 6.0 and it places both buy and sell stop orders at the same time when i tried it in V6.0. I then tried it in 6.5 but it would only place the buy orders. So Im taking it that your comment about not being able to place orders on both sides is for 6.5 only? If this is the case, is re-adding this ability on the list of considerations for v 7.0?

              Comment


                #8
                Yes, this is a limitation we introduced in 6.5 that did not exist in 6. We will be reviewing this again for NT7.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  Ray, Thanks for clearing that up. Unless there was a specific technical reason for it I would say a lot of traders would like to see that back in (including myself)

                  Comment


                    #10
                    When will the V7 be released?

                    Originally posted by NinjaTrader_Ray View Post
                    Yes, this is a limitation we introduced in 6.5 that did not exist in 6. We will be reviewing this again for NT7.
                    BTW, when will the V7 be released?

                    Comment


                      #11
                      No ETA yet. We plan to have first beta out be end of this year.

                      Comment


                        #12
                        did you get any help writing this strategy?

                        Comment


                          #13
                          As indicated in previous posts, you can't place the two breakout / fade orders at the same time, but you could monitor the conditions for this and then place the needed order.
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            ok, could i program something so the chart on NT tell me the high and low of the previous bar?

                            Comment


                              #15
                              Yes, you can reference the High and Low of the previous bar in NinjaScript like this -
                              Code:
                              double myHigh = High[1];
                              double myLow = Low[1];
                              You can review those tutorials for a good start in coding indicators - http://www.ninjatrader-support.com/H...verview18.html
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by adeelshahzad, Today, 03:54 AM
                              2 responses
                              15 views
                              0 likes
                              Last Post adeelshahzad  
                              Started by dappa, Today, 09:18 AM
                              1 response
                              5 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by bill2023, Yesterday, 08:51 AM
                              5 responses
                              24 views
                              0 likes
                              Last Post bltdavid  
                              Started by frankthearm, Today, 09:08 AM
                              1 response
                              3 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by yertle, Today, 08:38 AM
                              2 responses
                              7 views
                              0 likes
                              Last Post yertle
                              by yertle
                               
                              Working...
                              X