// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("Adaptave Zones O_B & O_S Oscillator"); /*Adaptive Zones OB/OS OSCILLATOR*/ /*Automatically Adjusts the overbought and oversold levels based on past performance*/ /*Interpreted and coded by Anthony Faragasso*/ /*Can be used with PrePackaged indicators,RSI,CCI,STOCHK,STOCHD,MFI,ULTIMATE,*/ /*For ROC add the Close. ex.ROC(C,pds);*/ MaxGraph=10; /*Input */ Lookback=60; PerCent=95; Pds =14; /****Dimitri Code***********/ /*14-Day RSI of MACD()*/ //t=14; Replaced with pds= statement Var=MACD(); Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0); Dn=IIf(Var 10 ,50 ,IIf( Osc < 0 ,0,0)); Header=WriteIf(Osc==A1," RSI Of MACD",WriteIf(Osc==b2," RSI",WriteIf(Osc==C3," CCI",WriteIf(Osc==D4,"STOCHK",WriteIf(Osc==E5,"STOCHD",WriteIf(Osc==F6," MONEY FLOW INDEX",WriteIf(Osc==G7," ULTIMATE",WriteIf(Osc==H8," ROC(CLOSE)","")))))))); Plot(Value1, Header,6,1+4); /*BLUE*/ Plot(Value6," O/B",4,1+4); /*RED -TOP(SELL)*/ Plot(Value7," O/S",5,1+4); /*GREEN-BOT(BUY)*/ Plot(Baseline," Baseline",7,1+4); /* yellow*/ _SECTION_END();