Multiple timeframes RSI divergence
Forums › ProRealTime English forum › ProScreener support › Multiple timeframes RSI divergence
- This topic has 1 reply, 2 voices, and was last updated 4 years ago by robertogozzi.
Viewing 2 posts - 1 through 2 (of 2 total)
-
-
11/27/2019 at 2:26 PM #113734
hello , Big Thanks to Robertogozzi for converting 2 other screener if possible to convert this as well , i will try to use them in a manual strategy and if turns out good i will write down the rules and hopefully we can all benefit from it.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455//RSI Divergences Screener By Frank (Francesco)//Variables://number of bars to calculare RSI valueRsiPeriod = 10//Oversold LevelRsiOverSold = 30//OverBought LevelRsiOverBought = 70//Minimum distance from two consecutive RSI Highs or RSI LowsMinBarRange = 3MyRSI = rsi[RsiPeriod](Close)RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBoughtRsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSoldif RsiMax thenRSIMax1 = MyRSI[1]High1 = High[1]for I = MinBarRange to 80if RsiMax[I] thenRSIMax2 = MyRSI[I + 1]High2 = High[I + 1]breakendifnextendifCondRibassista = RsiMax and ((High1 > High2 and RSIMax1 < RSIMax2) or (High1 < High2 and RSIMax1 > RSIMax2))if RsiMin thenRSIMin1 = MyRSI[1]Low1 = Low[1]for I = MinBarRange to 80if RSIMin[I] thenRSIMin2 = MyRSI[I + 1]Low2 = Low[I + 1]breakendifnextendifCondRialzista = RsiMin and ((Low1 < Low2 and RSIMin1 > RSIMin2) or (Low1 > Low2 and RSIMin1 < RSIMin2))if CondRibassista thenResult = 2endifif CondRialzista thenResult = 1endif11/28/2019 at 12:11 PM #113830There you go:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170// 1 = ↑// 2 = ↓// 9 = no signal on that TF//// 4 = 4-hour TF// H = 1-hour TF// 1 = 15-minute TF// 5 = 5-minute TF//TIMEFRAME(default)//RsiPeriod = 10RsiOverSold = 30RsiOverBought = 70MinBarRange = 3//TIMEFRAME(4 hour)XMyRSI = rsi[RsiPeriod](Close)XRsiMax = XMyRSI < XMyRSI[1] and XMyRSI[1] > XMyRSI[2] and XMyRSI[1] > RsiOverBoughtXRsiMin = XMyRSI > XMyRSI[1] and XMyRSI[1] < XMyRSI[2] and XMyRSI[1] < RsiOverSold//if XRsiMax thenXRsiMax1 = XMyRSI[1]XHigh1 = High[1]for xI = MinBarRange to 80if XRsiMax[xI] thenXRsiMax2 = XMyRSI[xI + 1]XHigh2 = High[xI + 1]breakendifnextendifXCondRibassista = XRsiMax and ((XHigh1 > XHigh2 and XRsiMax1 < XRsiMax2) or (XHigh1 < XHigh2 and XRsiMax1 > XRsiMax2))//if XRsiMin thenXRsiMin1 = XMyRSI[1]XLow1 = Low[1]for xI = MinBarRange to 80if XRsiMin[xI] thenXRsiMin2 = XMyRSI[xI + 1]XLow2 = Low[xI + 1]breakendifnextendifXCondRialzista = XRsiMin and ((XLow1 < XLow2 and XRsiMin1 > XRsiMin2) or (XLow1 > XLow2 and XRsiMin1 < XRsiMin2))XSignal= 9000IF XCondRialzista > 0 THENXSignal = 1000ELSIF XCondRibassista > 0 THENXSignal = 2000ENDIF//TIMEFRAME(1 hour)YMyRSI = rsi[RsiPeriod](Close)YRsiMaY = YMyRSI < YMyRSI[1] and YMyRSI[1] > YMyRSI[2] and YMyRSI[1] > RsiOverBoughtYRsiMin = YMyRSI > YMyRSI[1] and YMyRSI[1] < YMyRSI[2] and YMyRSI[1] < RsiOverSold//if YRsiMaY thenYRsiMaY1 = YMyRSI[1]YHigh1 = High[1]for YI = MinBarRange to 80if YRsiMaY[YI] thenYRsiMaY2 = YMyRSI[YI + 1]YHigh2 = High[YI + 1]breakendifnextendifYCondRibassista = YRsiMaY and ((YHigh1 > YHigh2 and YRsiMaY1 < YRsiMaY2) or (YHigh1 < YHigh2 and YRsiMaY1 > YRsiMaY2))//if YRsiMin thenYRsiMin1 = YMyRSI[1]YLow1 = Low[1]for YI = MinBarRange to 80if YRsiMin[YI] thenYRsiMin2 = YMyRSI[YI + 1]YLow2 = Low[YI + 1]breakendifnextendifYCondRialzista = YRsiMin and ((YLow1 < YLow2 and YRsiMin1 > YRsiMin2) or (YLow1 > YLow2 and YRsiMin1 < YRsiMin2))YSignal= 900IF YCondRialzista > 0 THENYSignal = 100ELSIF YCondRibassista > 0 THENYSignal = 200ENDIF//TIMEFRAME(15 minute)ZMyRSI = rsi[RsiPeriod](Close)ZRsiMaZ = ZMyRSI < ZMyRSI[1] and ZMyRSI[1] > ZMyRSI[2] and ZMyRSI[1] > RsiOverBoughtZRsiMin = ZMyRSI > ZMyRSI[1] and ZMyRSI[1] < ZMyRSI[2] and ZMyRSI[1] < RsiOverSold//if ZRsiMaZ thenZRsiMaZ1 = ZMyRSI[1]ZHigh1 = High[1]for ZI = MinBarRange to 80if ZRsiMaZ[ZI] thenZRsiMaZ2 = ZMyRSI[ZI + 1]ZHigh2 = High[ZI + 1]breakendifnextendifZCondRibassista = ZRsiMaZ and ((ZHigh1 > ZHigh2 and ZRsiMaZ1 < ZRsiMaZ2) or (ZHigh1 < ZHigh2 and ZRsiMaZ1 > ZRsiMaZ2))//if ZRsiMin thenZRsiMin1 = ZMyRSI[1]Zlow1 = low[1]for ZI = MinBarRange to 80if ZRsiMin[ZI] thenZRsiMin2 = ZMyRSI[ZI + 1]Zlow2 = low[ZI + 1]breakendifnextendifZCondRialzista = ZRsiMin and ((Zlow1 < Zlow2 and ZRsiMin1 > ZRsiMin2) or (Zlow1 > Zlow2 and ZRsiMin1 < ZRsiMin2))ZSignal= 90IF ZCondRialzista THENZSignal = 10ELSIF ZCondRibassista THENZSignal = 20ENDIF//TIMEFRAME(5 minute)WMyRSI = rsi[RsiPeriod](Close)WRsiMaW = WMyRSI < WMyRSI[1] and WMyRSI[1] > WMyRSI[2] and WMyRSI[1] > RsiOverBoughtWRsiMin = WMyRSI > WMyRSI[1] and WMyRSI[1] < WMyRSI[2] and WMyRSI[1] < RsiOverSold//if WRsiMaW thenWRsiMaW1 = WMyRSI[1]WHigh1 = High[1]for WI = MinBarRange to 80if WRsiMaW[WI] thenWRsiMaW2 = WMyRSI[WI + 1]WHigh2 = High[WI + 1]breakendifnextendifWCondRibassista = WRsiMaW and ((WHigh1 > WHigh2 and WRsiMaW1 < WRsiMaW2) or (WHigh1 < WHigh2 and WRsiMaW1 > WRsiMaW2))//if WRsiMin thenWRsiMin1 = WMyRSI[1]WLow1 = Low[1]for WI = MinBarRange to 80if WRsiMin[WI] thenWRsiMin2 = WMyRSI[WI + 1]WLow2 = Low[WI + 1]breakendifnextendifWCondRialzista = WRsiMin and ((WLow1 < WLow2 and WRsiMin1 > WRsiMin2) or (WLow1 > WLow2 and WRsiMin1 < WRsiMin2))WSignal= 9IF WCondRialzista THENWSignal = 1ELSIF WCondRibassista THENWSignal = 2ENDIF//TIMEFRAME(default)Signal = XSignal + YSignal + ZSignal + WSignalIF Signal = 9999 THENSignal = 0ENDIFSCREENER[Signal](Signal AS "1=↑,2=↓/4H15")If you want to try to replace 9000, 900, 90 and 9 with 0 you will see what happens (leading 0’s are dropped, so 9929 becomes 20) and if you like it more. If you don’t you can restore the original 9’s.
I only tested it for syntax errors.
1 user thanked author for this post.
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
Find exclusive trading pro-tools on
Similar topics: