![]() |
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 |
|
Senior Member
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
|
Hello ,
managed order handling I have the following scenario : Entry in position with 2 lots. SetStopLoss(entrysignalname,CalculationMode.Price, stopprice,false); EnterLongLimit(BarsInProgress,true,2,entrylimit,en trysignalname); .... Later I do a partial exit with: ExitLong(1,"partial exit",entrysignalname); at this point my strategy has only 1 lot. ... Later when the Stop loss is hit, the stop loss order still executes 2 lots. This is wrong as the strategy contains only 1 lot. Questions: 1. How can I amend the Stop loss order to reflect the partial exit (hence I need 1 lot stop loss) 2. What is the procedure to ensure that the stop loss order reflects the proper quantity? best regards Andreas www.zweisteintrading.eu |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi Andreas,
This is how it will work with a managed order system. If you want to scale out, you must first scale in with separate entry names. Then pair the exits with a specific entry signal name. Any other approach can lead to quantity mismatch. An alternative to this is to use the unmanaged approach, which allows you to submit, and change orders exactly how you want, but without any built in position management. http://www.ninjatrader.com/support/h...d_approach.htm
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
|
OK,
I expected something better from NinjaTrader By the way, why do you have the quantity parameter in the managed Exit??? functions. You do not need it and it will only create confusion. regards Andreas |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Quantity is available there if you want to use it. We don't want to introduce more restrictions in those exit overloads.
The unmanaged approach is designed exactly for situations like this. If you do not like Ninja's built in position and order management, you can create your own with an unmanaged strategy.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
|
It is not for me, for my own codebase I do use unmanaged frequently.
It is a tiny project for a customer and I just find out now that what he wants is not do-able with the managed code. In the timeframe given there is no way I will start using unmanaged order handling. I have read your documentation, but not having this basic feature just escaped my view . I read some comments from earlier posts (beta NT7), and it seemed a bug that ninja was going to fix. regards |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Thanks for the comments, Andreas. At this time, there will be no change to the exit overloads that disallow quantity.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Partial Exit - named signal exit stop not updated | MicroTrends | Strategy Development | 5 | 02-08-2011 10:17 AM |
| Partial Exit signal | mix.net | Strategy Development | 18 | 07-16-2010 01:08 PM |
| Partial Exit Not Working | Prospectus | Strategy Development | 3 | 10-08-2009 07:11 AM |
| Partial fill on exit | astrolobe | Strategy Development | 11 | 09-03-2009 07:48 AM |
| New scale-out exit being ignored after a partial, then complete fill on previous exit | vjsworld | Strategy Development | 11 | 05-18-2009 12:59 PM |