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

Partial fill

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

    Partial fill

    Hi there,

    I have a general question:
    when getting a partial fill for a target order, will the system try to cancel the remaining of the associated orders with the position?

    I believe that this is the current reality on the system but clearly it should not behave like that, only when the entire position is closed you should send a cancelled pending exit order. otherwise I would be without a stop in the market.

    could you clarify how it should work? I can send logs and traces if required.

    kind regards,
    Nir

    #2
    Nir,

    Please change your strategy to run on ByStrategyPosition instead of PerEntryExecution for the "Stop & Target submission" property.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      OK will do.

      could you please quickly explain what does the: execution.Order.Filled number will include in each case?

      what other impact this property have on the strategy management?

      I have 2 entries, if I will use the by strategy position how will i know how much was filled for each entry?

      if I leave my strategy as is (use to work all right before) I now have 1 set of exit orders that think I got the full position (double than the amount I actually need) and the second set of exit orders that have the right size (half of the position).

      hope you understand me. if you can refer me to sample or extra info on this topic it would be great,

      thx
      Nir

      Comment


        #4
        execution.Order.Filled will return the amount filled on the IOrder and NOT the amount filled in this particular execution.

        execution.Order.Filled will tell you the amount filled for that order. You can keep track of the amount filled manually.

        I do not know what you mean. Are you trying to have 2 sets of Exits for 1 entry? This is not advisable. If you want to scale out you need to scale in with 2 entries.

        If you essentially want the same entry. Submit an entry1 and an entry2 at the same time. Then for your exits scale out with half the protective orders assigned to entry1 and the other half to entry2.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi Josh,

          this is what I am doing.

          however following your sample code onorderupdate() for both entries and when the property is ByStrategyPosition for reason that I am not sure I am getting on one set of exit (target and stop related to entry 1) the full position quantities instead of only half and on the second set of exit (target and stop related to entry 2) the approperiate half size.

          any ideas why?
          when the property is set to PerEntryExecution it is working as expected. (but than the original problem is still there)

          thx nir

          Comment


            #6
            Nir,

            I will need to test some things. I will get back to you later.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Hi Josh,

              any news on this topic?

              thx
              nir

              Comment


                #8
                Nir,

                I am in contact with the development department because there is no easy solution yet.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  thx, any estimation for time line? did you manage to reproduce?

                  do you think there will be advantage if I would use: execution.Quantity instead?

                  which direction should be followed PerEntryExecution in which case NTshould not cancel the exit orders on partial fills or ByStrategyPosition in which case maybe I need to change my code and use execution.quantity? or you have an internal issue there as well...

                  any info would be great,

                  thx Nir

                  Comment


                    #10
                    Nir,

                    I do not have any further information. The direction we are investigating is with the PerEntryExecution, but this can easily flop depending on what we find. execution.Quantity may/may not be of use. We just don't know yet. When we determine a suitable solution we will inform the community at that time. Thank you for your patience.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Josh,

                      could you please provide an update to this issue?

                      Regards,
                      Nir

                      Comment


                        #12
                        Hi Nir,

                        Rest assured this issue has not fallen through the cracks. We are working hard to address this and will release an approach that will not have any holes in it as soon as possible.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Is this resolved ...

                          Originally posted by NinjaTrader_Josh View Post
                          Hi Nir,

                          Rest assured this issue has not fallen through the cracks. We are working hard to address this and will release an approach that will not have any holes in it as soon as possible.
                          hi ninja ...

                          Is this resolved ... if I am using setProfitTarget and setStopLoss and I get partial fills can I be sure that the original order, stop and target are managed as they should be?

                          thanks

                          Comment


                            #14
                            Paul, which order handling setting are you using?
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_Bertrand View Post
                              Paul, which order handling setting are you using?
                              Sorry Bertrand I don't undertand ...

                              I am using SetProfitTarget to set the target and SetStopLoss to set the stop loss and I am sending orders with

                              // set stop for all orders

                              SetStopLoss(CalculationMode.Price,stopLossPrice);

                              // set target for this order

                              SetProfitTarget(entrySignal,CalculationMode.Ticks, targetTicks);

                              // send order

                              EnterLong(0,noLots,entrySignal);
                              EnterLongLimit(0,true,noLots,entryPrice,entrySigna l);
                              EnterShort(0,noLots,entrySignal);
                              EnterShortLimit(0,true,noLots,entryPrice,entrySign al);

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by lakman184, 03-24-2024, 01:30 PM
                              4 responses
                              26 views
                              0 likes
                              Last Post morpheus0  
                              Started by thumper57, 05-11-2024, 04:30 PM
                              15 responses
                              44 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by Salahinho99, 05-05-2024, 04:13 AM
                              10 responses
                              70 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by lorem, 04-25-2024, 09:18 AM
                              13 responses
                              56 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by llanqui, Yesterday, 11:10 AM
                              3 responses
                              24 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Working...
                              X