Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

enter with limits and handling partial fills

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

    enter with limits and handling partial fills

    Hello,

    Im using the managed approach and entering with limits

    longEntryOrder = EnterLongLimit(0,liveUntilCancelled,enter_qty,Low[1],"LongEntry1");

    for both long and short entries

    In OnExecution i am receiving the Fills or partial fills and have been tracking the
    execution.Order.Filled amount as it comes in.

    Now in the OnExecution this is where is set the targets

    ExitShortLimit(0,liveUntilCancelled,1,High[1]-(TgtTicks1*TickSize),"ShortTgt1","ShortEntry1");
    ExitShortLimit(0,liveUntilCancelled,1,High[1]-(TgtTicks2*TickSize),"ShortTgt2","ShortEntry1");
    ExitShortLimit(0,liveUntilCancelled,1,High[1]-(TgtTicks3*TickSize),"ShortTgt3","ShortEntry1");

    So at the moment i am entering a quantity of 3 for the enter limit and correspondingly setting 3 separate targets.

    My question is with the above - given i am using the 'entrysignal' to tie the exitshortlimit to the entry .. does it matter that i submit all 3 targets at once even if they are filled partially 1 at a time vs all filled at once in one call to onexecution?
    Should i be using the execution.Order.Filled amount and only submit based on this?
    However in my print statements i notice that the amount can go from 1 to 3 so i need to subtract from the Quantity to the filled to determine how much was filled? This is what i need to clarify.
    If in the case of managed and i dont need to worry as the managed approach will keep a count of how many fills there are for the original order tied with the entrysignal or do i need to manage this myself ? Or will i be left with 2 exitlimits out there as orders for which there are no entries in the case where i only get a fill of 1 for an original quantity of 3.
    Hope this makes sense -


    thanks
    Last edited by soulfx; 05-12-2017, 06:12 AM.

    #2
    Hello soulfx,

    Thanks for opening the thread.

    My question is with the above - given i am using the 'entrysignal' to tie the exitshortlimit to the entry .. does it matter that i submit all 3 targets at once even if they are filled partially 1 at a time vs all filled at once in one call to onexecution?
    You should not run into issue attaching multiple orders with the fromEntrySignal to achieve partial fills and multi leveled profit targets. You will want those targets to have their own tag, however.

    Should i be using the execution.Order.Filled amount and only submit based on this?
    Since market volatility can cause variance when submitting orders on a bar close and using the "Price To Enter" as the "Price Entered," you will get information more accurate with your broker when you place your protective orders using OnExecution() instead of using the data fed through OnBarUpdate()

    However in my print statements i notice that the amount can go from 1 to 3 so i need to subtract from the Quantity to the filled to determine how much was filled? This is what i need to clarify.
    If in the case of managed and i dont need to worry as the managed approach will keep a count of how many fills there are for the original order tied with the entrysignal or do i need to manage this myself ? Or will i be left with 2 exitlimits out there as orders for which there are no entries in the case where i only get a fill of 1 for an original quantity of 3.
    Partial fills are possible through the managed approach. If you have a target fill some of the order quantity, you can certainly have another order method from the managed approach fill the rest of that order quantity. Of course, using the same target signal names would only change that order, so unique target signal names would be required, which you are doing in the code provided.

    For reference, various information on what you can and cannot do with the Managed Approach can be found here: http://ninjatrader.com/support/helpG...d_approach.htm

    If you have any additional questions while implementing and testing this, please don't hesitate to write back.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X