![]() |
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
|
|||||||
| Miscellaneous Support Miscellaneous support issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Jun 2011
Posts: 16
Thanks: 1
Thanked 0 times in 0 posts
|
hi,
i am trying this: if (true) { EnterShortLimit(sentry); EnterLongLimit(lentry); } when i test the strategy i get some results, now if i try it this way: if (true) { EnterLongLimit(lentry); EnterShortLimit(sentry); } i get totally different results: i looked at the chart for both strategy results, and it seems if i placed a LONG LIMIT order first, and there was no LONG fill, While the price of the bar hit & passed my SHORT limit order (which was second in the order), i will not get any fills! is this normal? how to write such a script??? Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
xbaha,
The reason this happens is because you actually can't have two working limit orders in opposite directions simultaneously. You can read up on the internal order handling rules which prevents the submission of such an order here: http://www.ninjatrader.com/support/h...d_approach.htm Basically what you would need to do is only submit one of the limits at a time. If price moves in the opposite direction closer to your other desired limit you would want to cancel the first, then submit the other instead and just switch back and forth if price keeps moving back and forth. An alternative if you really want both orders in at the same time is to use the Unmanaged Approach for order submission, but this is reserved for skilled programmers and system developers who are absolutely certain they know exactly what they are doing because it bypasses any protection NT may provide in the Managed Approach for order errors.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2011
Posts: 16
Thanks: 1
Thanked 0 times in 0 posts
|
do you mean the Unmanaged Approach could have errors in the results because the script could have looked ahead?
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
xbaha,
No, unmanaged approach provides you zero safety net. Whatever you tell the strategy to do in terms of order placement is exactly what the strategy will do. There is no hand holding done by NT to try and protect you from erroneous orders or order rejections and such. You can read more about this in the Help Guide: http://www.ninjatrader.com/support/h...d_approach.htm
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Long & Short Order Problem | upshon | Strategy Development | 1 | 03-03-2011 03:24 AM |
| Short & long at the same time | "CJS" | Strategy Development | 5 | 09-24-2010 05:15 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 |