TradingView
Socrate_FR
10 mar 2020 12:00

RSI + Divergences 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

Opis

Hi Guys,


This indicator gives you the trend changes (Designed with the basics of Vash's RSI advanced and the Fikira divergence indicator)

This indicator will only give you regular divergences.

Please keep in mind that a trading plan is not only built with momentum but also with location and structure.

Good trading,


Informacje o Wersji

Komentarze
Socrate_FR
Just updating the Chart ;)
ricomarc
Bonjour,
Quelle est la différence entre "Bull Div 1 2 3" (vert foncé (forêt)) et "Bull Div 4 5 6" (vert clair (fluo)) ?
Trading_Paradise
Congratulation very complex code. Would be nice to see the divergences on the price chart, there is a code open source but is not precise like yours (some divergences are missing, but those are nice displayed on the price chart). I'm trying to modify your code but is complex to understand. Here below the other code.
//@version=5

indicator(title='RSI divergences Kamrus90', shorttitle='PRSIDIV', overlay=true)

red = #FC4D24
green = #21CE99

// Inputs
isLabelsEnabled = input(true, title='Show Labels')
isChannelEnabled = input(false, title='Show Channel')
isHiddenEnabled = input(true, title='Show Hidden Divergence')
isRegularEnabled = input(true, title='Show Regular Divergence')

rsi = input(title='RSI length', defval=14)

high_src = input(high, title='High Source')
low_src = input(low, title='Low Source')

// Fractales
f_top(src) =>
src[4] < src[2] and src[3] < src[2] and src[2] > src[1] and src[2] > src[0]
f_bottom(src) =>
src[4] > src[2] and src[3] > src[2] and src[2] < src[1] and src[2] < src[0]
fractalize(src) =>
f_bottom__1 = f_bottom(src)
f_top(src) ? 1 : f_bottom__1 ? -1 : 0

oscilatorHigh = ta.rsi(high_src, rsi)
oscilatorLow = ta.rsi(low_src, rsi)

fractal_top = fractalize(oscilatorHigh) > 0 ? oscilatorHigh[2] : na
fractal_bot = fractalize(oscilatorLow) < 0 ? oscilatorLow[2] : na

high_prev = ta.valuewhen(fractal_top, oscilatorHigh[2], 0)[2]
high_price = ta.valuewhen(fractal_top, high[2], 0)[2]
low_prev = ta.valuewhen(fractal_bot, oscilatorLow[2], 0)[2]
low_price = ta.valuewhen(fractal_bot, low[2], 0)[2]

regular_bearish_div = fractal_top and high[2] > high_price and oscilatorHigh[2] < high_prev
hidden_bearish_div = fractal_top and high[2] < high_price and oscilatorHigh[2] > high_prev
regular_bullish_div = fractal_bot and low[2] < low_price and oscilatorLow[2] > low_prev
hidden_bullish_div = fractal_bot and low[2] > low_price and oscilatorLow[2] < low_prev

// Plotting
plot(title='H F', series=fractal_top ? high[2] : na, color=regular_bearish_div and isRegularEnabled or hidden_bearish_div and isHiddenEnabled ? red : not isChannelEnabled ? na : color.silver, offset=-2)
plot(title='L F', series=fractal_bot ? low[2] : na, color=regular_bullish_div and isRegularEnabled or hidden_bullish_div and isHiddenEnabled ? green : not isChannelEnabled ? na : color.silver, offset=-2)
plot(title='H D', series=fractal_top ? high[2] : na, style=plot.style_circles, color=regular_bearish_div and isRegularEnabled or hidden_bearish_div and isHiddenEnabled ? red : not isChannelEnabled ? na : color.silver, linewidth=3, offset=-2)
plot(title='L D', series=fractal_bot ? low[2] : na, style=plot.style_circles, color=regular_bullish_div and isRegularEnabled or hidden_bullish_div and isHiddenEnabled ? green : not isChannelEnabled ? na : color.silver, linewidth=3, offset=-2)

plotshape(title='+RBD', series=not isLabelsEnabled or not isRegularEnabled ? na : regular_bearish_div ? high[2] : na, text='R', style=shape.labeldown, location=location.absolute, colo
B-AnalysisTrading
Salut Socrate, est que c'est possible d'avoir une seconde EMA RSI sur cet indicateur ? Merci à toi d'avance
patrick_starrr
Dear Socrate,
Could you please create a button so that it only shows the divergences just whenever it is Oversold or Overbought?!
Thank you so much
Williambarnes724
So nice, thanks for this indicator
Olga_Ket
Спасибо Вам! Это супер помощь в трейдинге!👌👍💜
SmudgiTrader
Hello how can I have this indicator for Metatrader 4 (MT4) please?
jasototv
Hey Socrate, thanks for the script! nice work. any chance you can add a Stochastic overlay?
Więcej