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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        116 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        61 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        40 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        43 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        82 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X