• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged -- "Enforce Partial Fills" - not working?

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

    Unmanaged -- "Enforce Partial Fills" - not working?

    Hi NT -

    Does "Enforce Partial Fills" simulation work for UnManaged trades?

    If it does work for UnManaged trades what am I doing wrong? Is there another setting that I'm missing?

    I am using the UnManaged approach (i.e. IsUnmanaged = true) and I have selected "Enforce Partial Fill" from Tools-> Options -> Trading->Enforce partial fills (selected).

    I've tried a wide range of dates to "catch" a PartFilled state but ALL orders are getting filled. I have tried Market and Limit orders and I don't see any PartFills.

    Big Surf

    #2
    Originally posted by bigsurftrader View Post
    Hi NT -

    Does "Enforce Partial Fills" simulation work for UnManaged trades?

    If it does work for UnManaged trades what am I doing wrong? Is there another setting that I'm missing?

    I am using the UnManaged approach (i.e. IsUnmanaged = true) and I have selected "Enforce Partial Fill" from Tools-> Options -> Trading->Enforce partial fills (selected).

    I've tried a wide range of dates to "catch" a PartFilled state but ALL orders are getting filled. I have tried Market and Limit orders and I don't see any PartFills.

    Big Surf
    If you run a market replay and choose the Historical radio button, that guy will give all partial fills, on every entry, at least for futures trading three contracts. Don't know why it does that but it does and it's really handy when you're trying to code for partial fills. I code in managed mode but it would probably do it for unmanaged. It's worth a try anyway.

    Comment


      #3
      Thank you very much for the tip! I'll try it first thing in the morning. Night :-)

      Comment


        #4
        Is there a way to capture Partfills when running a Strategy?

        Comment


          #5
          This is what I do in OnExecution to keep track of the PnL:
          Code:
                 Trade lastTrade = null;
          
                  if( e.IsExitStrategy
                      || e.IsExit )
                  {
                      if( State == State.Realtime
                          && SystemPerformance.AllTrades.Count > 0 ) 
                      {
                          lastTrade = SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1];
                          if( lastTrade != null )
                          {
                              if( e.Order.OrderState == OrderState.Filled
                                  && e.Order.Filled > 0 )
                              {
                                  if (lastTrade.ProfitCurrency > 0)
                                  {
                                      // Add 'em up
                                  }
                              }
                              else if( e.Order.OrderState == OrderState.PartFilled )
                              {
                                  if (lastTrade.ProfitCurrency > 0)
                                  {
                                      // Add 'em up
                                  }
                              }
                          }
                      }
                  }
          I was hoping Ninja would answer because this isn't quite right. It works most of the time but I'm missing something. I wonder if say you have a part fill that requires two tries at it, one them goes through OnExecution but the other one doesn't. I got part filled on the exit just this morning and my calculations were off by one contract and I don't understand why.

          Comment


            #6
            Hello

            You can utilize the following example which shows one way of checking for part fills: http://ninjatrader.com/support/forum...ead.php?t=7499

            In traderpards post, you can see the use of OrderState.PartFilled, this would be the same process or check the State of the order. What you do with that information would be up to you, but this would be how to access it.


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hi Jesse - the link does not answer my question. I am trying to simulate "PartFill" from a strategy analyzer and it's not simulating the partial fills. I've tried up to 2 years of trades and zero part fills.

              How can we simulate partial fills?

              Comment


                #8
                Here's my original post:
                Hi NT -

                Does "Enforce Partial Fills" simulation work for UnManaged trades?

                If it does work for UnManaged trades what am I doing wrong? Is there another setting that I'm missing?

                I am using the UnManaged approach (i.e. IsUnmanaged = true) and I have selected "Enforce Partial Fill" from Tools-> Options -> Trading->Enforce partial fills (selected).

                I've tried a wide range of dates to "catch" a PartFilled state but ALL orders are getting filled. I have tried Market and Limit orders and I don't see any PartFills.

                Big Surf

                Comment


                  #9
                  Bumping this thread as I think others are also interested in the response.

                  Comment


                    #10
                    Hello,

                    Thank you for the reply.

                    In reference to your original question, Yes the enforce partial fills option is specifically for the simulator account and the order methods you can use to submit orders which would include the unmanaged approach.

                    You would not see partial fills in Historical data specifically, but using any of the play forward modes such as Realtime data, Market Replay or the Simulated data feed you would be able to simulate partial fills if a partial fill could happen at that point in time. Historically you would not be able to simulate partial fills using tools like a Backtest or even just a charts historical data, it would need to play through and have the granularity needed to become a partial fill.

                    Posts #5 and #6 would still be correct for your other question "Is there a way to capture Part fills when running a Strategy?", these posts detail how to capture partial fills which is a different concept from generating a part fill. Causing a partial fill to happen would rely on enforcing partial fills, the quantities used and the volume available at the time of the order.

                    Please let me know if I may be of additional assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks Jesse - that makes sense. Appreciate it!

                      Big Surf

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by spikeruk, Today, 01:49 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_PaulH  
                      Started by Yandychang, Today, 02:16 PM
                      2 responses
                      10 views
                      0 likes
                      Last Post Yandychang  
                      Started by priceisking, Today, 01:16 PM
                      1 response
                      6 views
                      0 likes
                      Last Post NinjaTrader_PaulH  
                      Started by kashyapjdave, 03-23-2017, 12:12 AM
                      11 responses
                      1,956 views
                      0 likes
                      Last Post forextrader2003  
                      Started by Gav_G, 07-26-2018, 04:29 PM
                      5 responses
                      422 views
                      0 likes
                      Last Post NinjaTrader_PaulH  
                      Working...
                      X