![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Nir,
Please change your strategy to run on ByStrategyPosition instead of PerEntryExecution for the "Stop & Target submission" property.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Nir,
I will need to test some things. I will get back to you later.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Josh,
any news on this topic? thx nir |
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Nir,
I am in contact with the development department because there is no easy solution yet.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#10 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Member
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Josh,
could you please provide an update to this issue? Regards, Nir |
|
|
|
|
|
#12 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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
NinjaTrader Customer Service |
|
|
|
|
|
#13 | |
|
Senior Member
Join Date: Jan 2007
Location: , ,
Posts: 133
Thanks: 1
Thanked 0 times in 0 posts
|
Quote:
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 |
|
|
|
|
|
|
#14 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
Paul, which order handling setting are you using?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Jan 2007
Location: , ,
Posts: 133
Thanks: 1
Thanked 0 times in 0 posts
|
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); |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange Market Order Partial Fill Exit Behavior | mrlogik | Strategy Development | 1 | 08-29-2008 10:47 PM |
| Simulate Partial fill ... with ease. | ltemme | Automated Trading | 4 | 08-16-2008 10:04 AM |
| Partial Fills | Harry | ATM Strategies (Discretionary Trading) | 5 | 02-26-2008 06:25 AM |
| ATM cancels entry after partial fill | Futures_Shark | ATM Strategies (Discretionary Trading) | 4 | 09-06-2007 04:47 PM |
| How to complete entry on a partial fill in V5? | Merv | Miscellaneous Support | 3 | 12-30-2005 06:24 AM |