Zorro keeps crashing when I try to run this script and I have no idea why. I think the script is ok but any ideas would be appreciated:

I wanted to thank the responders to my HMA script. I am still trying to get it to work but hopefully we can get a copy of it into the indicators.c for the next version.


function run()
{
var *ClosePrice = series(priceClose());
var *EMA17 = series(EMA(ClosePrice,17));
var *EMA35 = series(EMA(ClosePrice,35));
var *EMABuySignal = series(0);
var *EMASellSignal = series(0);
var *RSIBuySignal= series(0);
var *RSISellSignal= series(0);



if(EMA17 > EMA35)
EMABuySignal=1;
else
EMABuySignal=0;

if(EMA17 < EMA35)
EMASellSignal=1;
else
EMASellSignal=1;

if(RSI(ClosePrice,16) > 50)
RSIBuySignal=1;
else
RSIBuySignal=0;

if(RSI(ClosePrice,16) < 50)
RSISellSignal=1;
else
RSISellSignal=0;


if((EMABuySignal[0] +RSIBuySignal[0] > 1.5) && (EMABuySignal[1] +RSIBuySignal[1] < 1.5))

enterLong();

if((EMASellSignal[0] +RSISellSignal[0] > 1.5) && (EMASellSignal[1] +RSISellSignal[1] < 1.5))

enterShort();
}