_SECTION_BEGIN("Ribbon"); 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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); /*Buy or Sell Condition*/ AA=EMA(C,3); BA=EMA(C,23); CA=EMA(C,50); Buy = Cross(AA,BA); Sell = Cross(BA,AA); /*Plot Buy or Sell Arrows*/ PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20); PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20); /*Plot EMA*/ Plot( CA, "50 EMA",colorGreen,styleNoRescale); Plot( BA, "23 EMA",colorRed,styleNoRescale); Plot( AA, "3 EMA",colorBlue,styleNoRescale); /*Plot Ribbon */ rc=IIf (AA>BA AND BA>CA, rc=colorBlue,IIf (AA>CA AND CA>BA, colorPink,IIf (BA>AA AND AA>CA, colorGreen,IIf (BA>CA AND CA>AA, colorOrange,IIf (CA>AA AND AA>BA, colorBrown,IIf (CA>BA AND BA>AA, colorYellow,colorWhite)))))); Plot (6,"RIBBON",RC,styleOwnScale|styleArea|styleNoLabel,-0.5,100);