TradingView
RicardoSantos
Jan 11, 2016 9:57 PM
[RS]Auto Regression Channel V0
FX:EURUSD
5
Euro Fx/U.S. Dollar
FXCM
Description
⋅
Jan 11, 2016 9:57 PM
EXPERIMENTAL:
Auto adjusting regressive channel.
experimental
regression
Parallel Channel
Comments
Spunsen
⋅
May 2, 2022 6:48 PM
//Для тех, кто искал //
@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
⋅
Jul 19, 2018 10:56 AM
You really make useful scripts.....loved this one : )
BillionaireLau
⋅
Apr 19, 2020 9:11 AM
Is that really regresison ? Seems like it is composed by ema
h2Trader
⋅
Jun 16, 2018 6:22 PM
#Grail. Thnx Dev! <3
More
//@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)