in helpguide ExitLong is ignored if not long but I''ll try again with this
protected override void OnBarUpdate()
{
double limitPrice = 3877;
if (IsFirstTickOfBar)
++elapsedBars;
if (Count - 2 == CurrentBar && entryCnt == 0)
{
++entryCnt;
elapsedBars = 0;
EnterLongLimit(0, true, 1, limitPrice, "Long Limit");
}
if (elapsedBars == 5 && Position.MarketPosition == MarketPosition.long)
ExitLong("Long Limit");
}

Comment