_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( H, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( L, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
a=WMA(H,5);
b=WMA(L,5);
Buy=Ref(C,-1)>Ref(a,-1) AND Ref(L,-1)>Ref(b,-1) AND C>Ref(H,-1) AND CCI(14)>50;
Sell=Ref(H,-1)<Ref(a,-1) AND Ref(C,-1)<Ref(b,-1) AND C<Ref(L,-1) AND CCI(14)<-50;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-20);
for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy Above\n@" + H[i-1], i, L[ i ]-35, colorGreen,colorYellow );
if( Sell ) PlotText( "Sell Below\n@" + L[i-1], i, H[ i ]+35, colorRed, colorYellow );
}