If i were you i would try this, instead of that code.
Code:
function run()
{
var *Price = series(priceClose());
var *Trend = series(EMA(Price,13));


if(Price<Trend) {
enterShort();
Stop = 2*ATR(100);
Profit=100*PIP;
}
else
 if(Price>Trend) {
enterLong();
Stop = 2*ATR(100);
Profit=100*PIP;
}
}


Maybie...

Last edited by Aku_Aku; 09/28/12 21:14.