_SECTION_BEGIN("Price ");
BarsToday = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
Plot(C, "", IIf(C > O, colorBrightGreen, colorRed), ParamStyle("Price Style", styleCandle, maskPrice));
Title = FullName()+" - "+Name()+"\nO:"+O+", H:"+H+", L:"+L+", C:"+C;
_SECTION_END();
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
Buy = Cross(C, EMA( P, Periods)) OR C>EMA( P, Periods) OR TimeNum() > 152800 ;
Sell = (Cross(EMA( P, Periods),C)) OR C<EMA( P, Periods) OR TimeNum() > 152800;
Buy= ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlack);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorBlack);
Short=Sell;
Cover=Buy;
PositionSize = MarginDeposit = 1;
_SECTION_END();