The reason for the crash is because you have alot of coding errors in your script. Ive retyped out your code for you to see where Ive changed it.

Quote:

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));

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) {
enterLong();
crossed = 0;
}
else if(crossed < 0 && RSI16[0] < 50) {
enterShort();
crossed = 0;
}
else
crossed -= sign(crossed);
}


Basically Im still not an expert myself but from what I can tell with your script you created a pointer called EMABuySignal then you tried to fill it with an integer. Use the crossOver & crossUnder functions with a delay for checking to see whether EMAs have crossed.