//===========================================================
_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("FOOLS SYSTEM");
e1 = EMA(C,20);
e2 = EMA(C,50);
M1 = Ref((H+L)/2,-1);
Plot(e1,"",colorYellow,styleNoRescale);
Plot(e2,"",colorWhite,styleNoRescale|styleThick);
Plot(M1,"",colorLightGrey,styleStaircase);
ColorUP = IIf(e1>e2,colorWhite,colorBlack);
ColorDN = IIf(e1<e2,colorWhite,colorBlack);
PlotShapes(Cross(C,e1)*shapeUpArrow,ColorUP,0,L);
PlotShapes(Cross(e1,C)*shapeDownArrow,ColorDN,0,H);
PlotShapes((C > e2 AND L < e2)*shapeUpArrow,ColorUP,0,L);
PlotShapes((C < e2 AND H > e2)*shapeDownArrow,ColorDN,0,H);
Plot(10,"",IIf(e1>e2,colorBlue,colorRed),styleOwnScale|styleNoLabel,0,750,0,-5,3);
Plot(20,"",IIf(C>e1, colorBlue,colorRed),styleOwnScale|styleNoLabel,0,750,0,-5,3);
Plot(30,"",IIf(C>e2, colorBlue,colorRed),styleOwnScale|styleNoLabel,0,750,0,-5,3);
Plot(40,"",IIf(C>M1, colorBlue,colorRed),styleOwnScale|styleNoLabel,0,750,0,-5,3);
_SECTION_END();
//===========================================================