// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("WilliamR OBOS"); SetChartOptions(0,0,chartGrid30|chartGrid70); GraphXSpace = 10; _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); function PercentR(periods ) { return -100 * ( HHV( H, periods ) - C )/( HHV( H, periods ) - LLV( L, periods ) ); } pdwr = Param( "WilliamR Periods", 27, 1, 200, 1 ); pds= Param( "WilliamR Smoothening Periods", 1, 1, 100, 1 ); wr0=PercentR(pdwr);//(EMA(ParamField("Price Field"),ps),pdrsi); Obl=Param("WR Over Bought Limit",-30,-40,0); Obx=Param("WR Extreme Over Bought Limit",-10,-40,0); Osl=Param("WR Over Sold Limit",-70,-100,-60); Osx=Param("WR Extreme Over Sold Limit",-90,-100,-60); wrs=MA(wr0,pds); Plot( wrs, "Smooth WillimR", colorBlue, ParamStyle("Smooth RSI Style",styleThick)); Plot(Obl,"Overbought Limit",colorRed,styleLine); Plot(Osl,"Oversold Limit",colorGreen,styleLine); Plot(Obx,"",colorRed,styleLine); Plot(Osx,"",colorGreen,styleLine); Plot(-50,"",colorDefault,styleLine|styleDashed); //Color = ParamColor("Color", colorLightBlue ); PlotOHLC( Obx,Obx,Obl,Obl, "", ColorBlend( colorPink, GetChartBkColor(), 0.8 ), styleNoLabel | styleCloud | styleNoRescale); PlotOHLC( osl,osl,Osx,Osx, "", ColorBlend( colorLightBlue, GetChartBkColor(), 0.8 ), styleNoLabel | styleCloud | styleNoRescale); _SECTION_END();