RicardoSantos

[RS]RSI Divergence V3

EXPERIMENTAL: using reflections / mirrors to pinpoint reversal points and zones on a rising/falling aglomeration.
default is turned off, needs to be turned on in the options.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="RSI Divergence V3", shorttitle="RSID.V3", overlay=false)
hidemirrors = input(true)
buylimit = input(40)
selllimit = input(60)

source = close

rsi1 = rsi(source, input(14))
rsi2 = rsi(source, input(50))
//  ||---
excess = rsi2-rsi1
posexcess = excess > 0 ? buylimit-excess : buylimit
negexcess = excess < 0 ? selllimit-excess : selllimit

plot(posexcess, style=area, color=orange, histbase=buylimit)
plot(negexcess, style=area, color=olive, histbase=selllimit)
//  ||---   Mirroring
posmirror = excess > 0 ? 0+excess : 0
negmirror = excess < 0 ? 100+excess : 100
posmirror1 = excess > 0 ? 0+excess*2 : 0
negmirror1 = excess < 0 ? 100+excess*2 : 100
posmirror2 = excess > 0 ? 0+excess*4 : 0
negmirror2 = excess < 0 ? 100+excess*4 : 100
plot(hidemirrors ? na : posmirror, style=area, color=olive, transp=45, histbase=0)
plot(hidemirrors ? na : negmirror, style=area, color=orange, transp=45, histbase=100)
plot(hidemirrors ? na : posmirror1, style=area, color=olive, transp=60, histbase=0)
plot(hidemirrors ? na : negmirror1, style=area, color=orange, transp=60, histbase=100)
plot(hidemirrors ? na : posmirror2, style=area, color=olive, transp=75, histbase=0)
plot(hidemirrors ? na : negmirror2, style=area, color=orange, transp=75, histbase=100)

//  ||---   Outputs
//  ||---   This need to be last to show on top.
plot(rsi1, color=#98b8be, style=histogram, linewidth=2, histbase=50)
plot(rsi2, color=#be9e98, style=histogram, linewidth=2, histbase=50)

plot(rsi1, color=black, style=line, linewidth=1)
plot(rsi2, color=black, style=line, linewidth=1)

hline(buylimit, color=green)
hline(selllimit, color=maroon)
snapshot


This might be better represented as a candlestick overlay indicator. Green Candlestick bullish trend, red candlestick bearish trend.
+1 Reply
I'm still a bit puzzled by this one...:D
+1 Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out