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, 05: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:

          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, 10: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, "[B]AtmStrategyTemplate[/B]", atmStrategyBuyId);
                  AtmStrategyCreate(Cbi.OrderAction.Sell, OrderType.Limit, High[0]+5*TickSize, 0, TimeInForce.Day, orderSellId, "[B]AtmStrategyTemplate[/B]", 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 gentlebenthebear, Today, 01:30 AM
                    2 responses
                    13 views
                    0 likes
                    Last Post gentlebenthebear  
                    Started by Kaledus, Today, 01:29 PM
                    2 responses
                    8 views
                    0 likes
                    Last Post Kaledus
                    by Kaledus
                     
                    Started by frankthearm, Yesterday, 09:08 AM
                    13 responses
                    45 views
                    0 likes
                    Last Post frankthearm  
                    Started by PaulMohn, Today, 12:36 PM
                    2 responses
                    16 views
                    0 likes
                    Last Post PaulMohn  
                    Started by Conceptzx, 10-11-2022, 06:38 AM
                    2 responses
                    56 views
                    0 likes
                    Last Post PhillT
                    by PhillT
                     
                    Working...
                    X