PDA

View Full Version : EnterLongLimit order


mike8943
07-04-2008, 05:43 AM
i have EnterLongLimit order in my strategy which executes outside price range.

the orders are executed at 1.5723 however the price don't reach it.

this is the code from barupdate method:

double priceRange=(10000*(Bollinger(1, 5).Upper[0]-Bollinger(1, 5).Lower[0]));
EnterLongLimit(Swing(5).SwingHigh[0], n+"");
SetProfitTarget("", CalculationMode.Ticks, priceRange);
SetStopLoss("", CalculationMode.Ticks, 3*priceRange, false);

http://img370.imageshack.us/img370/3621/eurusd7420081minkp3.th.jpg (http://img370.imageshack.us/my.php?image=eurusd7420081minkp3.jpg)

NinjaTrader_Ray
07-04-2008, 08:18 AM
See the section on Historical fill processing.

http://www.ninjatrader-support.com/HelpGuideV6/BacktestAStrategy.html

mike8943
07-04-2008, 01:28 PM
i understand there are two types of the fill for limit orders, liberal and default,
but i still dont understand why the orders are getting filled OUTSIDE the price range, higher than bars high?

NinjaTrader_Josh
07-04-2008, 01:47 PM
Limit orders do not guarantee you to be filled within the bar. They do guarantee you your limit price or no fill at all. This is the case because a limit order waits for the limit price and depending on bid/ask pressures you can theoretically get filled above/below any of the last traded prices.