Gaussian Channel [DW]

This study is an experiment utilizing the Ehlers Gaussian Filter technique combined with lag reduction techniques and true range to analyze trend activity.
Gaussian filters, as Ehlers explains it, are simply exponential moving averages applied multiple times.
First, beta and alpha are calculated based on the sampling period and number of poles specified. The maximum number of poles available in this script is 9.
Next, the data being analyzed is given a truncation option for reduced lag, which can be enabled with "Reduced Lag Mode".
Then the alpha and source values are used to calculate the filter and filtered true range of the dataset.
Filtered true range with a specified multiplier is then added to and subtracted from the filter, generating a channel.
Lastly, a one pole filter with a N pole alpha is averaged with the filter to generate a faster filter, which can be enabled with "Fast Response Mode".

Custom bar colors are included.

Note: Both the sampling period and number of poles directly affect how much lag the indicator has, and how smooth the output is.
Larger inputs will result in smoother outputs with increased lag, and smaller inputs will have noisier outputs with reduced lag.
For the best results, I recommend not setting the sampling period any lower than the number of poles + 1. Going lower truncates the equation.
版本注释: Updates:

Huge shoutout to @e2e4mfck for taking the time to improve the calculation method!
-> migrated to v4
-> pi is now calculated using trig identities rather than being explicitly defined.
-> The filter calculations are now organized into functions rather than being individually defined.
-> Revamped color scheme.

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

For my full list of premium tools, check the blog:

Reach out on Telegram:


@DonovanWall How should I interpret the thickness of the channel?
+8 回复
DonovanWall longtermgoals
@longtermgoals, The thickness of the channel is really subjective preference. It could be used to capture volatility within it, or it could be used as a buffer zone for bullish and bearish breakouts.
what does mean grean and red in the indicator?
+7 回复
Can I get this Gaussian indicator
+7 回复
JackOfAllTrades0 doctordreylive
@doctordreylive, copy and paste....
+2 回复
ShukriMahadi JackOfAllTrades0
@JackOfAllTrades0, copy and paste to where?
if you use the "Fast Response Mode" is this going to change the channel within a candle?
+4 回复
you are an artist (: ,keep the good work up.
+2 回复
thanks @DonovanWall
really nice script.
+1 回复
I just found this update, excellent work @e2e4mfck and @DonovanWall, thank you!

One tiny improvement, change line 101 to:
beta = (1 - cos(4*asin(1)/per)) / (pow(sqrt(2), 2/N) - 1)

ie Replace 1.414 with it's proper full value of root 2
+1 回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 关于 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 私人消息 在线聊天 退出