![]() |
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: Aug 2010
Posts: 114
Thanks: 3
Thanked 0 times in 0 posts
|
Hi there,
I have the following general question: In the unmanaged approach for order methods there exits the method ChangeOrder(), which obviously allows to change certain characistics of an order (Quantity, LimitPrice, StopPrice). However I am working with the managed approach and would like to change just the quantity of the order. How can this best be done without closing the order and producing a new one? By the way to change to the unmanaged approach is not really an option for me, would need a lot of changes I assume. Is that correct? Best, Peter |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,683
Thanks: 116
Thanked 189 times in 184 posts
|
Hello unter821,
Thank you for your post. You are correct, to change the order with the Managed Approach you will need to cancel the order and then resubmit the order. For a reference on using the CancelOrder() method please visit the following link: http://www.ninjatrader.com/support/f...ad.php?t=18890 The Unmanaged Approach is reserved for experienced programmers, for more information on the Unmanaged Approach please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm Please let me know if I may be of further assistance.
Patrick H.
NinjaTrader Customer Service
Last edited by NinjaTrader_PatrickH; 01-25-2012 at 07:52 AM.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2010
Posts: 114
Thanks: 3
Thanked 0 times in 0 posts
|
Ok, when I understand the concept correct I have to know already at the point of the entry, how I want to scale out later. In your case I EnterLONG 5 pieces two times to be able to scale out later with 5 pieces each. Is that correct?
What can I do under the following scenario: - I enter a trade with a quantity of 2 - During the trade my vola decreases and I add 1 quantity having a new total quantity of 3 - For some reason my vola goes up dramatically and have to reduce my quantitiy by 2 to a total quantitiy of just 1 Any way to handle that with the managed approach? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,683
Thanks: 116
Thanked 189 times in 184 posts
|
Hello unter821,
Thank you for your response. With the Managed Approach each entry would need a specific signalName. So for your first condition you would enter with two separate EnterLong()s: if (Condition1) { EnterLong(1, "Signal1"); EnterLong(1, "Signal2"); } And then for your second condition you would enter once more with a specifc signalName: if (Condition2) { EnterLong(1, "Signal3"); } Then once you need to reduce your quanitity by two, you can exit with the singalName: if (Condition3) { ExitLong(1, "Signal1"); ExitLong(1, "Signal2"); } For a reference on scaling out of a position using the Managed Approach please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=3751 Please let me know if I may be of further assistance.
Patrick H.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Managed vs Unmanaged approach | Merlin997 | Automated Trading | 1 | 10-18-2011 09:48 AM |
| OCO possible with Managed approach? | motownlucas | Automated Trading | 1 | 06-20-2011 10:01 AM |
| Cancel Order Using Managed Approach | Baseheadz | Strategy Development | 18 | 06-14-2011 02:24 PM |
| Under the managed approach, how can i change | kaywai | Strategy Development | 2 | 05-23-2011 01:11 AM |
| Managed Approach Orders question | ScottB | Automated Trading | 9 | 07-30-2010 02:19 PM |