TradingView
RicardoSantos
11 ינו׳ 2016 21:57

[RS]Auto Regression Channel V0 

Euro Fx/U.S. DollarFXCM

תיאור

EXPERIMENTAL:
Auto adjusting regressive channel.
תגובות
Spunsen
//Для тех, кто искал //@version=5
//@version=5
indicator(title='[RS]Auto Regression Channel V0', shorttitle='ARC', overlay=true)
length_RS = input(10)
length2_RS = input(10)
multiplier_RS = input(0.01)
h_RS = 0.0
l_RS = 0.0
mid_RS = 0.0
ema_1 = ta.ema(close, length_RS)
ema_2 = ta.ema(h_RS[1] - close, length_RS)
ema_3 = ta.ema(h_RS[1] - close, length_RS)
h_RS := ta.ema(na(h_RS[1]) ? high : high >= h_RS[1] ? high : ema_1 >= mid_RS[1] ? h_RS[1] + ema_2 * multiplier_RS : h_RS[1] - ema_3 * multiplier_RS, length2_RS)
ema_4 = ta.ema(close, length_RS)
ema_5 = ta.ema(close - l_RS[1], length_RS)
ema_6 = ta.ema(close - l_RS[1], length_RS)
l_RS := ta.ema(na(l_RS[1]) ? low : low <= l_RS[1] ? low : ema_4 <= mid_RS[1] ? l_RS[1] - ema_5 * multiplier_RS : l_RS[1] + ema_6 * multiplier_RS, length2_RS)
mid_RS := math.avg(h_RS, l_RS)
plot(title='H', series=h_RS, color=color.new(color.black, 0), linewidth=2)
plot(title='M', series=mid_RS, color=color.new(color.black, 0), linewidth=2)
plot(title='L', series=l_RS, color=color.new(color.black, 0), linewidth=2)
theCerics
You really make useful scripts.....loved this one : )
BillionaireLau
Is that really regresison ? Seems like it is composed by ema
h2Trader
#Grail. Thnx Dev! <3
עוד