![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
|
Please,
If i need to get a trade at a breakout (if price touch a Max or a Min) can I send both stop orders at the same bar? EnterLongStop for Max and EnterShortStop for min What will happen? I mean, both orders will be alive until price touches one, or not? Do I must to cancel one it's not touched?.... I did a search but I didn't find anything similar, but I'm sure there are examples of this kind of trading... Thanks a lot |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
joanNT, with default order handling on (not the new NT7 unmanaged approach) you would run into 'ignored' orders due the 'under the hood' order handling rules -
http://www.ninjatrader-support.com/H...verview36.html (bottom section here) Best is to work with TraceOrders = true in the Initialize() and then open the output window as you work on / debug the strategy. You would need to monitor price and only send one needed order then while canceling the unneeded leg of the bracket.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2010
Posts: 128
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Bertrand,
with the new unmanaged orders in NT7, can I send a cancel order "CancelOrder(IOrder order)" and an entry opposite stop order simultaneously? I mean If I've an: long = EnterLongStop(1, true, DefaultQuantity, max_range, "TryUp"); then at next barupdate: CancelOrder(long); short = EnterShortStop(1, true, DefaultQuantity, min_range, "TryDown"); I must say that if I send the cancel order, price will be far enough not to permit a previous filling order. is this possible? or it can't be simultaneously and I must cancel first and when agreed send the short stop order. Thanks again. |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
joanNT, with the new unmanaged approach you could place the full entry bracket (long and short simultaneous) and then cancel as needed, reason being there're no order handling rules anymore preventing you placing the orders in this scenario. As this is unmanaged you would need to keep track of IOrder references yourself to access those later.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Long and Short | ZendoZafu | SuperDOM and other Order Entry Windows | 1 | 07-10-2009 08:38 AM |
| short/long stop limits | dave1992 | Miscellaneous Support | 1 | 05-26-2009 06:05 AM |
| Long & Short | murfinp | Strategy Development | 1 | 05-13-2009 08:56 AM |
| Long & Short Stop Order | PHOLAN | Automated Trading | 3 | 09-23-2008 08:18 AM |
| Long & short combined in 1 strategy | dtf139 | Automated Trading | 5 | 01-08-2008 08:23 PM |