Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not oco

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

    Not oco

    Hello,

    when there is done a question referring stoploss and profittargets this includes every time the discussion what an OCO is, how it works and where orders reside.

    So I want to ask a question referring to order transmission a different way:

    I don´t want to have stoploss and profittargets on brokers-server therefore I do NOT code in my strategy stoplosses and targets. I only do stoplosses and the exits I do with conditions.

    My concrete question now is:
    when eg ExitLong(10000, "xxx", "Long1") is realized what about the referring SetStopLoss("Long1", CalculationMode.Price, Position.AvgPrice,false). Will this order persist or be cancelled? I do some strat-trades in demo mode today with this "solution" to avoid targets on brokers-server and I see the stoploss for every position is cancelled with every exit of position.

    I´m happy about this but can you please confirm. This seems to be like an OCO but without targets on brokers server(?)


    Thanks
    Tony

    #2
    Hi Tony,

    Yes, this part of the strategies management of your orders. If there is no remaining strategy position, then all exit orders are cancelled.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Ryan, thank you for your prompt reply. But this is so important for the next 20 years of my trading and I´m not sure if I can understand correctly.

      Can you please answer this a bit more concrete. What do you mean with "if there is no remaining strategy position"? I mean your "IF..", so when would it be that there is a remaining strategy position?

      From the point of functionality it´s like an OCO as with my ExitLong(..."Long1") the referring SetStopLoss ("Long1"...) is cancelled. Or can it be that the Stoploss (Long2) persists even when ExitLong (Long2) is realized?

      So, maybe this is the difference and advantage of doing 4x1 entries each with a referring stoploss (and not to do 1 entry with 4 contracts as with an exitlong of 1 contract there is no referring stoploss to be cancelled - or will the number of stoplosses will be count down)?

      Thanks
      Tony

      Comment


        #4
        It's not OCO in the sense that these orders are linked together with an OCO id. It's part of the strategies internal management of positions and orders. If your strategy is in a flat position, then all remaining exit orders are cancelled. You can't have working exit orders when your strategy is flat.

        Yes, it will also look at signal name if you have specified a fromEntrySignal value for your set statement. If there remains no further positions due to an ExitLong("mySignal) matching the signal name in the Set statement, then this set order is cancelled as well.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Ryan,

          thank you again for your reply. I understand that when "If your strategy is in a flat position, then all remaining exit orders are cancelled." You can't have working exit orders when your strategy is flat." This sounds somehow like "for the last position" - but what if there are 4 positions and one is closed because of the filled condition (not as OCO profit target, but because an EMA crosses a SMA and then {exitlong} - then the strategy is NOT flat, because from the 4 contracts only 1 has gone. From the 4 stoplosses 1 is cancelled then too? - even the strategy is not flat?

          Best
          Tony

          Comment


            #6
            It depends on the signal names and exact method signatures used. Please share a code snippet and example scenario and will be happy to expand further.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by alifarahani, Today, 09:40 AM
            3 responses
            15 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by RookieTrader, Today, 09:37 AM
            4 responses
            17 views
            0 likes
            Last Post RookieTrader  
            Started by PaulMohn, Today, 12:36 PM
            0 responses
            5 views
            0 likes
            Last Post PaulMohn  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            40 views
            0 likes
            Last Post love2code2trade  
            Started by junkone, Today, 11:37 AM
            3 responses
            25 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X