Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

One Entry with one Signal and multiple Stoploss and Target not working

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

    One Entry with one Signal and multiple Stoploss and Target not working


    Hi , I am placing long order for 20 contracts with below code with signal name @"$Long"

    HTML Code:
    EnterLongLimit(0, true, 20, (High[1]+0.25) ,  @"$Long");
    Placing 2 Stop Loss Order for above long with below code.

    HTML Code:
    ExitLongStopMarket(0, true, 15, longSLPrice, "lstop", @"$Long");
    ExitLongStopMarket(0, true, 5, longSLPrice, "lstop2", @"$Long");
    Placing 2 Target Order with below code.

    HTML Code:
    ExitLongLimit(0, true, 15, longPTPrice, "ltarget", @"$Long");
    ExitLongLimit(0, true, 5, longPTPrice, "ltarget2", @"$Long");
    My expectation here is,

    Use case 1 : When both the stop loss are filled, both target has to be cancelled automatically.
    1.a : if the stop is filled partially, it has to cancel the target order for the same quantity.

    Use case 2: when Target Order is filled, Stop loss order has to be closed automatically.
    2.a if the target is filled partially, it has to cancel the stop loss order for the same quantity

    But it is not working in that way. Am I missing anything here ? I don't see option to match one SL order with one Target order also.
    Last edited by nandhumca; 04-18-2022, 02:34 AM.

    #2
    Hi nandhumca, I have only managed to have 2 stop orders if i had two entries as well named differently. If there is a way to 'split' an entry order in the 'managed order approach' so one can use two stops with it I would be interested in the solution as well. But my fear is that is not possible unless you switch to the 'unmanaged order approach' which i would not recommend. Just split the entry order in two orders witht he same price.
    cbaer

    Comment


      #3
      Hi Cbaer,

      Thanks for your post. Split the entry order itself into 2 (1 with 15 and another with 5) and manage its own signal name is my option B. But I want to take Profit 1 for my first 15 order and take profit 2 for last 5 contracts. That is not guaranteed in option B.

      Comment


        #4
        Hi NT support team,

        any input on this will be helpful .

        Comment


          #5
          Hi nandhumca, thanks for posting. You can set two stop/target orders for the same signal. It's not breaking any of the managed approach rules here:


          To manage OCO type behavior you will either need to use the unmanaged approach where you can specify an OCO. To keep using the managed approach you should split the entry order into two parts, set EntriesPerDirection to at least 2, then tie your stop and targets to the individual entry orders using unique signal names. You would have two entires @"$Long1" and @"$Long2" then tie your stop and target to each of these.

          Kind regards,
          -ChrisL

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          54 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          131 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X