Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Partial Fill and Exits in Managed Approach

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

    Partial Fill and Exits in Managed Approach

    Hi,

    Would like to understand how the NT handles the following scenario in managed orders approach.

    Let's say I enter a Long position on ES with large 5000 contracts and I get partial fills. After 30 secs later, the order has not completely filled, and I set SetStopLoss and SetProfitTarget. Before the order fill is completed, the stop or profit target is hit. What will happen to the order with outstanding quantity to be filled? Will the order still be open, and the remaining quantity be filled later?

    In the same scenario above but instead of using SetStopLoss and ProfitTarget, I used Exit orders with the latest filled quantity from the IOrder. What will happen to the order?

    Thanks in advance.

    #2
    Correct, remaining qty's could still be coming in filled, as long as no rejection was seen which would trigger the realtime error handling and thus cancellation of orders and closing of positions. What would be cancelled of course for you is the OCO'ed exit order if you worked with the Set methods.

    Comment


      #3
      Hi Bertrand,

      In such event, can I use CancelOrder with its IOrder to cancel the order with outstanding fills, after the Sets or Exit orders? If not, how could I close this position gracefully?

      Comment


        #4
        It's not ideal with Set's since they would not provide you with an IOrder return per default, so you would not know their fillstate. However you could monitor them from OnOrderUpdate with this technique to get that reference - http://www.ninjatrader.com/support/f...ead.php?t=5790 and CancelOrder then entry then if Stop or Target report filled.

        Comment


          #5
          In the same scenario,before the position is filled completely and after the SetStopLoss() and SetProfitTarget() are called but before they are filled, another part fill comes along. What will happen to the StopLoss and ProfitTarget? Will there be another set of such StopLoss and ProfitTarget orders be generated with the new part fill qty automatically? Or internally, the StopLoss and ProfitTarget will adjust their order qty automatically?

          Comment


            #6
            That will depend in managed mode on if your script is using the Stop and Target Handling of PerEntryExecution or ByStrategyPosition, you can set this via the UI for each script.

            The former will generate a set new set of stops / targets, will the later just amend the existing orders.

            Comment


              #7
              1. Is it possible to set this Stop & Target submission property programmatically? Or even be read programmatically?

              2. If "ByStrategyPosition", I presume that each 'uniquely named' entry order will have just 1 set of stoploss and profit target, regardless of part fills, in a strategy with multiple concurrent entries of different instrument, right?

              3. If "PerEntryExecution", would each pair of stoploss and target generated per part fill, have a unique name, or all share the same name like "Stop loss" and "Profit target"?

              Comment


                #8
                It would not be documented officially, but you can use -

                StopTargetHandling = StopTargetHandling.ByStrategyPosition;
                StopTargetHandling = StopTargetHandling.PerEntryExecution;

                No ByStrategyPosition would mean, there's really only one order for the managed position (one for the stops, other for your targets if Sets are used)

                On PerEntryExecution then the names would still be StopLoss and ProfitTarget, however you would have course unique order id's, as no amends would take place.

                Comment


                  #9
                  Sorry, in order to understand what your meaning is, I rephrase my question. What happens when in "ByStrategyPosition" and I enter 2 Long entries with different name, will I only have 1 pair of StopLoss order and Target order for both entry orders, or 1 set of StopLoss and Target for each entry order?

                  If "OnPerExecution", I will still get 1 OnExecution event per every stoploss order that occur per part fill, right?

                  Comment


                    #10
                    Hi ckkoh_sgp,

                    With StopTargetHandling.ByStrategyPosition you will get a stacked stop loss and and profit target for the position and not for each individual order. This means the stop loss and profit targets will be at the same price for all orders. If the stop is hit all orders will be exited.

                    With StopTargetHandling.PerEntryExecution you will get separate stop losses and profit targets for each order. If the stop is hit only that one order will be exited.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    646 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    367 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    108 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    570 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    573 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X