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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        41 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X