Starting from a vrey simple strategy :
protected override void Initialize(){
CalculateOnBarClose=true;
EntryHandling=EntryHandling.AllEntries;
EntriesPerDirection=10;
SetStopLoss(CalculationMode.Ticks,stpTicks);
SetProfitTarget(CalculationMode.Ticks,ptTicks);
}
protected override void OnBarUpdate(){
if (way[0] == 1) EnterLong();
else if (way[0] == -1) EnterShort();
SetProfitTarget(CalculationMode.Ticks,ptTicks);
}
However, if I work with limit orders
protected override void OnBarUpdate(){
if (way[0] == 1) EnterLongLimit(Close[0]-ticksAway*TickSize);
else if (way[0] == -1) EnterShort(Close[0]+ticksAway*TickSize);
SetProfitTarget(CalculationMode.Ticks,ptTicks);
}
All positions/trades from opposite direction are then disregarded, like there's some interference somewhere. How's that ?

Comment