DonovanWall

Range Filter [DW]

This is an experimental study designed to filter out minor price action for a clearer view of trends.

Inspired by the QQE's volatility filter, this filter applies the process directly to price rather than to a smoothed RSI .

First, a smooth average price range is calculated for the basis of the filter and multiplied by a specified amount.
Next, the filter is calculated by gating price movements that do not exceed the specified range.
Lastly the target ranges are plotted to display the prices that will trigger filter movement.

Custom bar colors are included. The color scheme is based on the filtered price trend.
版本注释: Updates:

-> Migrated to v4.
-> Range Filter and the bands are now calculated in a singular function.
-> There are now two different calculation methods for the filter. Select the type you want to use via the "Filter Type" input. Type 1 is the original formula.
-> Multiple range sizing methods are now available. You can choose from the following scales:
- Points
- Pips (Works best with forex pairs, obviously)
- Ticks
- % of Price
- ATR
- Average Change (Default. This is the original sizing method.)
- Standard Deviation
- Absolute (Absolute numerical value)
-> Range smoothing is now optional, and you can specify your smoothing length. Smoothing only affects dynamic scales (ATR, Average Change, and Standard Deviation).
-> Filter movement can now be determined using wicks or close. This can be specified via the "Movement Source" input.
-> Stability Fix: Added correction for NaN values to stabilize initial states.
-> Reorganized the script structure.
-> Revamped the color scheme.
从常用脚本中删除 添加到常用脚本

评论

This indicator is perfection. So far my favourite on this platform. Thanks!
+3 回复
Thank you for your work! It is really a great indicator !
+3 回复
Congrats to the developer for this superb indicator. I would like to program an alert whenever the filter goes red or green, but as far as I understand, it has a lot of invisible changes in color (cross between Color0 and Color1), and therefore it causes to many noise/false-signals. How can I make an alert that corresponds to the visual core trend Color0 /Color1 cross? Thanks
+2 回复
DonovanWall aciriaco
@aciriaco, There aren't invisible transitions in the color. If you want to code signals for when filter direction changes, you need to use the upward and downward variables. These vars save the last directional state of the filter.
To make the signals, you can use a conditions like these:

bull_sig = upward==0 and upward
bear_sig = downward==0 and downward

That will signal the change in var states.
回复
aciriaco DonovanWall
@DonovanWall, thanks but no signal is triggered with the bull_sig and bear_sig as you stated. Made it work with a cross(upward,downward). Keep the good codes coming!!
回复
DonovanWall aciriaco
@aciriaco, Whoops. I left out the previous bar identifier. My apologies.

What I meant was:

bull_sig = upward==0 and upward
bear_sig = downward==0 and downward

But yes, cross conditions for the variables work as well since they move between 0 and 1. Glad you got it to work.

Edit: apparently I didn't leave it out. TV comments don't like to support brackets I guess. You need to reference the previous bar for the ==0 parts. lol
回复
Hey @DonovanWall, great idea! The QQE is pretty powerful, would be great to see more applications of it on price action rather than rsi!
Cheers
+2 回复
Can you please tell me how to set up alerts and backtest it when it colour changes.
+1 回复
DonovanWall ashishdhamija10
@ashishdhamija10, Alerts are pretty simple for color switching conditions. All you need is to establish when the upward and downward counters first start to get your trigger since color is linked to them.

https://0bin.net/paste/wTwUF6V+GP7uqL4T#Lm+0fRKcK9fK346k7WARwC+ugipRwY3wjYqq7ZdpILg

Just paste that to the bottom of the script, and you'll have alerts for the changes between color.
回复
These filter and Low Pass channel are really the best ones.
I will ask something on your Fiver page.
Indicators based on filters are the best.
+1 回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 在线聊天 退出