/*[[ Name := Min_Max_RSI Author := Copyright © 2005, David W Honeywell Link := transport.david@gmail.com Separate Window := Yes First Color := Blue First Draw Type := Line First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Line Second Symbol := 218 Minimum Chart Limits := 0.000000 Maximum Chart Limits := 100.000000 ]]*/ Input: RsiPeriods(14),ShowBars(500); Variable : shift(0),Hrsi(0),Lrsi(0); SetLoopCount(0); For shift = ShowBars DownTo 0 { If (iRSI(RsiPeriods,shift) <= 50.0000) then { Hrsi = 50.0000; }; If (iRSI(RsiPeriods,shift) > 50.0000 and iRSI(RsiPeriods,shift) >= Hrsi) then { Hrsi = iRSI(RsiPeriods,shift); }; If (iRSI(RsiPeriods,shift) >= 50.0000) then { Lrsi = 50.0000; }; If (iRSI(RsiPeriods,shift) < 50.0000 and iRSI(RsiPeriods,shift) <= Lrsi) then { Lrsi = iRSI(RsiPeriods,shift); }; SetIndexValue(shift, Hrsi); SetIndexValue2(shift, Lrsi); };