What is the difference between market order and limit order during backtest? .
According to document of GetCurrentBid(), when accessed during a historical backtest, the close price of the evaluated bar is substituted.
But If I replace EnterLongLimit() with EnterLong(), the back test on historical data is different.
*****************************************
Examples
protected override void OnBarUpdate()
{
if (CurrentBar < 20)
return;
// Only enter if at least 10 bars has passed since our last entry
if (BarsSinceEntry() > 10 && CrossAbove(SMA(10), SMA(20), 1))
EnterLongLimit(GetCurrentBid(), "SMA Cross Entry");
}
Comment