Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Handling

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

    Order Handling

    Hello,

    in the "SampleOnOrderUpdate" there is the stoploss with ExitLongStopMarket and the Target with ExitLongLimit (in OnExecutionUpdate)

    Do they work same as "normal" Setstoploss and Setprofittarget? Do they work also OCO (if stoploss hit then target cancelled and if target hit then stoploss cancelled)?

    Thank you!
    Tony

    #2
    Hello Tony,

    Thanks for your question.

    Exit methods will use logic built in to NinjaTrader to cancel orders that are tied via Entry Signals. Native OCO is not used here like they are with the Set methods. OCO can be implemented freely in Unmanaged strategies if native OCO is needed.

    We look forward to being of further assistance.

    Comment


      #3
      Hello,

      thank you for your reply. OK, so in the "SampleOnOrderUpdate" the "OCO functionality between stop and target" (so that stop is cancelled when target is hit and vv) is then in line 139 and 140 with stoporder=null and targetorder=null? It is not necessary to "Cancel stopOrder...", its enough to set it "null" without "cancel..."

      And because it is very important - and not clear to many people from what I know in our traderoom - I want to ask in this concern: stop and target are on the exchange but when internetconnection is broken then from the code in "SampelOnOrderUpdate" the stop is not cancelled when target is hit and vv the target is not cancelled when stop is hit because the OCO-functionality is on the pc (has to be cancelled with re-established connection or by phone, or its too late because one is in a trade (naked) already). Yes? No?

      BUT when working with SetProftTarget and SetStopLoss and NinjaTrader Continuum then the stop and the target is also at the exchange but in this case even when internetconnection is interrupted from traders pc then OCO will work and stop is cancelled when target is hit and target is cancelled when stop is hit. Yes? No?

      Thank you!
      Tony

      Comment


        #4
        Hello Tony,

        Yes, and Yes.

        Set methods use native OCO and Unmanged orders can use native OCO. Exit methods use local logic to cancel the other order.

        We look forward to assisting.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        93 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        138 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        123 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        73 views
        0 likes
        Last Post PaulMohn  
        Working...
        X