Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        7 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X