Last active
March 4, 2018 01:10
-
-
Save bkawk/b36a7d8169e5074fe46b40b45d51816b to your computer and use it in GitHub Desktop.
GHOST RSI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
study(title="GHOST RSI [@bkawk]", shorttitle="GHOST RSI [@bkawk]") | |
src = close, len = input(14, minval=1, title="Length") | |
up = ema(max(change(src), 0), len) | |
down = ema(-min(change(src), 0), len) | |
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down)) | |
slime = #B7ED0A | |
blood = #FF4167 | |
overbought = input(80, minval=1, title="Overbought") | |
bullish = input(60, minval=1, title="Bullish") | |
median = input(55, minval=1, title="Median") | |
bearish = input(40, minval=1, title="Bearish") | |
oversold = input(20, minval=1, title="Oversold") | |
band0 = hline(overbought, title='Overbought', linestyle=solid, linewidth=0, color=slime) | |
band1 = hline(bullish, title='Bullish', linestyle=solid, linewidth=0, color=slime) | |
band2 = hline(median, title='Median', linestyle=solid, linewidth=0, color=blood) | |
band3 = hline(bearish, title='Bearish', linestyle=solid, linewidth=0, color=blood) | |
band4 = hline(oversold, title='Oversold', linestyle=solid, linewidth=0, color=blood) | |
fill(band0, band1, color=slime, transp=90) | |
fill(band0, band2, color=slime, transp=90) | |
fill(band2, band4, color=blood, transp=90) | |
fill(band3, band4, color=blood, transp=90) | |
plot(rsi, title='RSI', transp=0, linewidth=2, color=#FFFFFF) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment