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)
I'm still a bit puzzled by this one...:D
+1 Reply


This might be better represented as a candlestick overlay indicator. Green Candlestick bullish trend, red candlestick bearish trend.
+1 Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out