Well noted jcl,
Below is the code, Kindly Help.
........
function run()
{
StartDate = 2005;
BarPeriod = 60;
Lots = 30;
MaxLong = 1;
MaxShort = 1;
Stop = 2 * ATR(14);
Trail = 2 * ATR(14);
//EntryTime =
Entry = -5*PIP;
Algo = "SMA 15,5"
vars Close = series(priceClose());
vars SMAFast = series(SMA(Close, 5));
vars SMASlow = series(SMA(Close, 15));
if(crossOver(SMAFast, SMASlow))
enterLong(TrailingStopLong);
else if(crossUnder(SMAFast, SMASlow))
exitLong(TrailingStopShort);
//exit long and go short if 5 SMA crosses under 15 SMA
if(crossUnder(SMAFast, SMASlow))
enterShort();
else if(crossOver(SMAFast, SMASlow))
exitShort();
.......