check this,i hope this is sufficient to u
_SECTION_BEGIN("EMA CROSSOVER CHART");
LongPer = Param("Long Period", 20, 30, 100, 5);
ShortPer = Param("Short Period", 50, 30, 100, 5);
LongMA = EMA(C, LongPer);
ShortMA = EMA(C, ShortPer);
LastHigh = HHV(H, LongPer);
GraphXSpace = 10;
Plot(LongMA, " EMA(C, " + WriteVal(LongPer, 1) + ")", colorBrightGreen, styleLine);
Plot(ShortMA, " EMA(C, " + WriteVal(ShortPer, 1) + ")", colorRed, styleLine);
Buy = Cross(LongMA, ShortMA);
Sell = Cross(ShortMA, LongMA);
PlotShapes(shapeUpArrow * Buy, colorBrightGreen, 0, L, - 10);
PlotShapes(shapeDownArrow * Sell, colorRed, 0, H, - 10);
Filter=Buy OR Sell;
Sell=ExRem(Sell,Buy); Buy=ExRem(Buy,Sell);
AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(BuyPrice,"BuyPrice");
AddColumn(SellPrice,"SellPrice");
_SECTION_END();