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 Fills

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

    Partial Fills

    Hello,

    I know that using SetStopLoss() the strategy will generate a stop loss for each partiall fill.

    What happend using ExitLongStop/ExitShortStop orders when a partial fill has ocurred? Do they generate a exit stop order for each partial fill too?

    Thank you in advance.

    #2
    For example:

    If I have set up a Buy Entry Limit order of 5 ES contracts at X price and the order has been filled only with 2 contracts, how many contract will generate the ExitLongStop order? 2?

    Thank you in advance.

    Comment


      #3
      Hello Plaket, and thank you for your question. Exit orders will return your position, or if you are using signal names, your linked position, to flat, regardless the actions of the trade desk. Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Thank you Jessica,

        I understand that that means that if my entry order has been partially filled, for example, with 2 contracts, the ExitLongStop order will generate an order of just 2 contracts. Is that correct?

        Thank you in advance.

        Comment


          #5
          We may not be on the same page here. Let's imagine a situation where the trade desk split an entry order into 99 contracts and 1 contract. Ninja will not keep track of this information with your position, and so when you go to exit the trade, Ninja will answer this with a request to place an order for 100 contracts. The trade desk is then free to decide how to fill these 100 orders. It's often the case that if they split it going in, they will split it going out the same way. Ninja does not control how this occurs; it may only react to decisions made by the trade desk.
          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            Thank you Jessica,

            Yes, I think that we are not in the same page. I'm asking about partial fills. Let's supose that my strategy sends a buy limit order of 100 contracts at X price. A few minutes ago the order is partially executed and only 50 contracts were executed.

            In this case, how many contracts will be generated using ExitLongStop method. I understand that the answer is 50 contracts because only those contracts were executed running this strategy. Is that correct?

            Comment


              #7
              Thank you for the added clarification. I do need to mention that exit methods can not take place until a bar after you enter the trade, and trades remaining only partially filled between bars is an unlikely event. I am researching what would happen in this unlikely event and will return shortly.
              Jessica P.NinjaTrader Customer Service

              Comment


                #8
                Hello Plaket,

                I was able to determine that in any kind of a partial fill situation,

                • If you trigger an exit order from OnBarUpdate, you can expect the total, and not partial, fill quantity to be used in a market exit order
                • If you trigger an exit order from OnExecution(Update), you will always have enough information to set the quantity of your limit, stop, stop limit, or MIT orders to use the correct quantity from each of your partial fills

                Therefore, it's always the case that even in a partial fill situation you can close out your order completely, and you can trust exit orders not to enter a position even on a partial fill that takes multiple bars to complete allowing your exit order to go through before your entry order is completely filled.


                If this is not the case, please report this here so that we may investigate further.


                I am attaching a test tool which can be used with the simulated feedback connection's market slider and very large quantity orders to generate partial fill orders for testing.
                Attached Files
                Jessica P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Kaledus, Today, 01:29 PM
                0 responses
                3 views
                0 likes
                Last Post Kaledus
                by Kaledus
                 
                Started by PaulMohn, Today, 12:36 PM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by yertle, Yesterday, 08:38 AM
                8 responses
                36 views
                0 likes
                Last Post ryjoga
                by ryjoga
                 
                Started by rdtdale, Today, 01:02 PM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by alifarahani, Today, 09:40 AM
                3 responses
                18 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X