Yes exactly you can set the delay longer than 1 bar, so if you changed delay to say 3 for example. The entry conditions would check to see if the EMAs have crossed in the last 3 bars & if they have and the other conditions are met then the trade will enter.
If you then say wanted to add a 3rd condition lets say for example the Stoch has to be above 20 or below 80 also.
function run()
{
BarPeriod = 60;
NumWFOCycles = 8;
NumBarCycles = 4;
set(PARAMETERS+FACTORS+TESTNOW+LOGFILE);
var *ClosePrice = series(priceClose());
var *EMA17 = series(EMA(ClosePrice,17));
var *EMA35 = series(EMA(ClosePrice,35));
var *RSI16 = series(RSI(ClosePrice,16));
var *Stoch1 = series(Stoch(14,3,MAType_SMA,3,MAType_SMA));
static int crossed = 0;
int Delay = 1;
if(crossOver(EMA17,EMA35))
crossed = Delay;
else if(crossUnder(EMA17,EMA35))
crossed = -Delay;
if(crossed > 0 && RSI16[0] > 50 && Stoch1[0] > 20) {
enterLong();
crossed = 0;
}
else if(crossed < 0 && RSI16[0] < 50 && Stoch1[0] < 80) {
enterShort();
crossed = 0;
}
else
crossed -= sign(crossed);
}
Hope this helps, and if Ive advised incorrectly anyone please feel free to correct.