// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("trend with pivot levels"); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); TimeFrameSet(inDaily); wc=C; TimeFrameRestore(); uptrend= Signal(18)MACD(7); PRSI=RSI(14)>55 ; NRSI=RSI(14)<45 ; Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( PRSI, colorGreen, IIf( NRSI, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_BEGIN("Chart"); MASK= ParamStyle("MASK",styleCandle| styleThick , maskAll); barcolor=IIf(UPTREND,colorGreen,IIf(doWNTREND,colorRed,colorBlue)); Plot(C, "C", barcolor,MASK); A=C>MA(C,50) ; B=CMA(C,50) ; B=CO AND C>Ref(C,-1) AND C>(H+L)/2 AND V>Ref(V,-1);// AND H>wc; Short=doWNTREND AND CRef(V,-1) ;//AND L