RicardoSantos

[RS]MTF RSI Weighted Range Envelope V0

EXPERIMENTAL:
Envelope range weighed by rsi and atr.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//@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)