I'm trying to exit only in 5 Minute bars in my strategy but i'm getting fill every 1 minute.
this is my code :
I added int the initialize : Add(PeriodType.Minute,iBarPeriod);
OnBarUpdate :
if (BarsInProgress != 0)
return;
if (m_Position == 0)
{
if (Closes[1][0] > Opens[1][0])
{
openPrc = Instrument.MasterInstrument.Round2TickSize(Closes[1][0]);
entryOrder = EnterLongLimit(iQty,openPrc,"EnL");
}
}
else if (m_Position > 0)
{
trgPrc = Closes[1][0];
trgPrcMode = CalculationMode.Price;
SetProfitTarget(trgPrcMode,trgPrc);
}

Comment