RicardoSantos

[RS]Scalpers Channels V0

EXPERIMENTAL:
Scalper channel inspired by keltner's channels
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title="[RS]Scalpers Channels V0", shorttitle="SC", overlay=true)
useTrueRange = input(true)
length = input(1440, minval=1)
smooth = input(1)
extrasmooth = input(1)
mult_increment = input(0.1)
mult = na(mult[1]) ? mult_increment : high >= upper[1] ? mult[1] + mult_increment : low <= lower[1] ? mult[1] + mult_increment : mult[1]
src = input(close, title="Source")
plot(mult, color=black)
ma = ema(ema(ema(src, length), smooth), extrasmooth)
range = useTrueRange ? tr : cum(tr)/(n+1)
rangema = ema(ema(ema(range, length), smooth), extrasmooth) * mult
upper = ma + rangema * 1
u0882 = ma + rangema * 0.882
u0764 = ma + rangema * 0.764
u0618 = ma + rangema * 0.618
u0500 = ma + rangema * 0.500
u0382 = ma + rangema * 0.382
u0236 = ma + rangema * 0.236
l0236 = ma - rangema * 0.236
l0382 = ma - rangema * 0.382
l0500 = ma - rangema * 0.500
l0618 = ma - rangema * 0.618
l0764 = ma - rangema * 0.764
l0882 = ma - rangema * 0.882
lower = ma - rangema * 1
c = blue
u = plot(upper, color=c, title="Upper")
plot(title='U0882', series=u0882, style=circles, color=black, linewidth=1)
plot(title='U0764', series=u0764, style=circles, color=black, linewidth=1)
plot(title='U0618', series=u0618, style=circles, color=black, linewidth=1)
plot(title='U0500', series=u0500, style=circles, color=black, linewidth=1)
plot(title='U0382', series=u0382, style=circles, color=black, linewidth=1)
plot(title='U0236', series=u0236, style=circles, color=black, linewidth=1)
plot(title='L0236', series=l0236, style=circles, color=black, linewidth=1)
plot(title='L0382', series=l0382, style=circles, color=black, linewidth=1)
plot(title='L0500', series=l0500, style=circles, color=black, linewidth=1)
plot(title='L0618', series=l0618, style=circles, color=black, linewidth=1)
plot(title='L0764', series=l0764, style=circles, color=black, linewidth=1)
plot(title='L0882', series=l0882, style=circles, color=black, linewidth=1)
plot(ma, color=c, title="Basis")
l = plot(lower, color=c, title="Lower")
fill(u, l, color=c)