PDA

View Full Version : two limite orders at one time


j2009
03-27-2009, 08:19 AM
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");
}

NinjaTrader_Josh
03-27-2009, 08:33 AM
j2009,

You cannot have orders in opposite directions both working simultaneously.