RicardoSantos

[RS]MTF RSI Weighted Range Envelope V0

EXPERIMENTAL:
Envelope range weighed by rsi and atr.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title='[RS]MTF RSI Weighted Range Envelope V0', shorttitle='E', overlay=true)
tf = input('5')
src = input(open)
ema_length = input(1)
rsi_length = input(20)
atr_length = input(20)
atr_offset = input(1)
ob_value = input(70)*0.01
os_value = input(30)*0.01

rsi = rsi(ema(src, ema_length), rsi_length)
range = atr(atr_length)[atr_offset] * (0.01*rsi_length)
h = src + ((100 - rsi) * range)
l = src - (rsi * range)

sh = security(tickerid, tf, h)
sl = security(tickerid, tf, l)

sob = sl + ((sh - sl)*ob_value)
sm = sl + ((sh - sl)*0.50)
sos = sl + ((sh - sl)*os_value)

p100 = plot(series=sh, title='', color=black, style=line, transp=0, linewidth=1)
pob = plot(series=sob, title='', color=red, style=circles, transp=0, linewidth=1)
pm = plot(series=sm, title='', color=black, style=circles, transp=0, linewidth=1)
pos = plot(series=sos, title='', color=lime, style=circles, transp=0, linewidth=1)
p0 = plot(series=sl, title='', color=black, style=line, transp=0, linewidth=1)

fill(pos, pob, color=purple, transp=90)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener 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 Billing Sign Out