// Downloaded From https://www.WiseStockTrader.com // Paste the code below to your price chart somewhere and green ribbon means both // both MACD and ADX trending up so if the red ribbon shows up the MACD and the ADX // are both trending down. _SECTION_BEGIN("trending ribbon"); uptrend=PDI()>MDI() AND MACD()>Signal() AND (ADX()>20); downtrend=MDI()>PDI() AND Signal()>MACD(); _SECTION_END(); _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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); Buy=Cross(StochK(),StochD()) AND uptrend OR Cross(PDI(),MDI()) AND uptrend OR Cross(ADX(),MDI()) AND (PDI()>MDI()) OR Cross(MACD(),Signal()) AND (ADX()>20) AND (StochK()>StochD()); Sell=Cross(Signal(),MACD()); PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,Low,Offset=-15); PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,High,Offset=-15); Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );