• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO bracket stop orders with different ATM strategies

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

    OCO bracket stop orders with different ATM strategies

    Hi Team,


    This really puzzles me.

    I am trying to place OCO bracket stop orders with different ATM strategies, but what happens is every time I finish doing it, I end up with the same ATM strategy for both stop orders, and the strategy for both stop orders is the one I choose for the second stop order.

    For example, for my OCO orders, I have ATM strategy A and B, if I choose A for the first stop order, B for the second, I will end up with both stop orders having B as their AMT strategy. And If I choose B for the first stop order, A for the second, I will have A for both stop order as their ATM strategy.

    So basically whatever ATM strategy I choose last will end up as the ATM strategy for my bracket OCO stop orders, regardless what I choose for the first order.

    I wonder why ? could some one help, thank you.


    Kind Regards


    Lux

    #2
    Hi lux.lu,

    Thank you for your note.

    Below is a link to a short video I have made demonstrating how to select different AtmStrategies with the entry orders in an OCO breakout.

    http://screencast.com/t/fmpRdTam
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chelsea.

      Lux

      Comment


        #4
        OCO orders in a strategy

        Hello ChelseaB,

        Would this OCO be possible as an automated strategy?
        For example, is it possible to place a OCO buy stop above the highest high of the last 3 bars with a OCO sell stop below the lowest low of the last 3 bars as an auto strategy?
        If one is filled, the other cancels, and a stop and target are attached.The management of either entry could be a 10 tick initial stop and a 30 tick initial target from inside the code, or should a ATM strategy could be used?

        Thanks for the help,

        DT_12
        Last edited by DayTrader12; 09-04-2015, 04:33 AM.

        Comment


          #5
          It looks like Mr Ticks tried something like this using the high and low of the previous bar for the buy and sell stop, but it does not work right. I found it in the download section here:
          http://ninjatrader.com/support/forum...t+order&desc=1
          This is a modified version of the SampleAtmStrategy that comes with NinjaTrader. It goes long/short with a buy/sell stop one tick above/below the high/low of the previous bar. It calls an ATM template that you must have created already from the DOM to manage the stop loss and trail stop attributes. It will cancel the pending ATM order after 'n' bars have passed and the order has not been filled.

          Comment


            #6
            Hello DayTrader12,

            OCO cannot be used with the entry orders with AtmStrategyCreate. So with this you would need to have logic that simulated the OCO functionality.

            Attached is an example to demonstrate.
            Attached Files
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks Chelsea. Have a great weekend.

              Comment


                #8
                Hello

                I tried strategy, You provided.

                Inside code specified: "**** YOU MUST HAVE AN ATM STRATEGY TEMPLATE NAMED 'AtmStrategyTemplate' CREATED IN NINJATRADER (SUPERDOM FOR EXAMPLE) FOR THIS TO WORK ****"

                but, in AtmStrategyCreate() "AtmStrategyTemplate1" "AtmStrategyTemplate2" template names used. Why?
                Last edited by fx.practic; 08-27-2017, 09:06 AM.
                fx.practic
                NinjaTrader Ecosystem Vendor - fx.practic

                Comment


                  #9
                  Hello fx.practic,

                  The code with AtmStrategyCreate uses the template name "AtmStrategyTemplate" with both entry orders.

                  Code:
                  AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, Low[0]-5*TickSize, 0, TimeInForce.Day, orderBuyId, "AtmStrategyTemplate", atmStrategyBuyId);
                  AtmStrategyCreate(Cbi.OrderAction.Sell, OrderType.Limit, High[0]+5*TickSize, 0, TimeInForce.Day, orderSellId, "AtmStrategyTemplate", atmStrategySellId);
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    I'm Sorry. You are right.
                    fx.practic
                    NinjaTrader Ecosystem Vendor - fx.practic

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by tvaughan4, Today, 04:37 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post tvaughan4  
                    Started by Convert, Today, 03:44 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by Yannick, Today, 02:43 PM
                    3 responses
                    10 views
                    0 likes
                    Last Post Yannick
                    by Yannick
                     
                    Started by brucerobinson, Today, 02:12 PM
                    2 responses
                    6 views
                    0 likes
                    Last Post brucerobinson  
                    Started by gurdonzn, Today, 12:36 PM
                    5 responses
                    23 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Working...
                    X