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
Comment