Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

oco orders

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

    oco orders

    Hello, I was wondering how i would go about putting in 2 orders as oco.

    #2
    Hello,

    Here is one way to do it: right click the DOM >select OCO, then place the order. The orders you place with the green OC light on will all cancel when one cancels. This link will help:
    DenNinjaTrader Customer Service

    Comment


      #3
      thank you, but i was meaning in a strategy. what i am wanting to do is to get into a trade, then have a take profit and stoploss where it would revearse at the stoploss, double up on the trade, and have a different take profit and stoploss. example, the strategy goes long 1 contract, gets stoped out for a loss so it goes short 2 contracts (twice that of the long) with a different take profit and stoploss amount. then it doesn't take anymore trades off of it so if it gets stoped out a second time the trade is over. and if it hits the takeprofit thats the end of the trade. so for example, it goes long 1 contract and goes up to its take profit, and thats the end of the trade.

      Comment


        #4
        Hello,

        You will have to code all of this out. There is no OCO order function. I suggest looking at all of the order management samples here: http://www.ninjatrader.com/support/f...splay.php?f=30

        And posting questions when you have them.
        DenNinjaTrader Customer Service

        Comment


          #5
          how would i use the oco property of an iorder object? from what i have been able to gather, the best way to go about codeing the oco is to use the onexecution method.

          Comment


            #6
            With this property you can access the OCO Id assigned to an order, for example through the Set() metods which would be OCO'ed automatically for a Stop / Target.

            If you work with NT7's Unmanaged mode you can directly link orders together by supplying an OCO string -

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            657 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            373 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            579 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X