![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, I tried to enter two limit ordres at the same time (see code below) - it seems that only the first one get executed... if the "sell high" is the first, I see all short orders in the result. If I move "buy low" before "sell high" in the code below, I will get a bunch of long orders and nothing for short.
Can I have both? Does one cancel the other? Thanks very much ! -J if (....) { //when it reach yesterday's high, sell short limit orderShort = EnterShortLimit(0, true, DefaultQuantity, priceHigh, "SellHigh"); //when it reaches yesterday's low, buy long limit orderLong = EnterLongLimit(0, true, DefaultQuantity, priceLow, "BuyLow"); } |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
j2009,
You cannot have orders in opposite directions both working simultaneously.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-time frame orders | heech | Automated Trading | 1 | 11-19-2008 04:53 PM |
| Time Not Showing in Orders Tab | TapeReader | Miscellaneous Support | 1 | 09-24-2008 09:09 AM |
| Limit Orders Pile Up In Real Time | JOHN FORTUNE | Automated Trading | 5 | 06-26-2008 03:06 PM |
| Market at time orders | ddunne82 | Miscellaneous Support | 3 | 04-05-2005 06:02 AM |
| Entering orders based on time | mtrader | ATM Strategies (Discretionary Trading) | 0 | 03-28-2005 01:23 AM |