DonovanWall

Dynamic Equalizer [DW]

This is an experimental study inspired by techniques primarily utilized in the visual and audio processing worlds.
This study is designed to serve as a pre or post processing filter designer that allows you to shape the frequency spectrum of your data on a more "in-depth" level.

First the data is fed through my Band-Shelf Equalizer function.
The EQ in this script works by dividing the input signal into 6 bands and 2 shelves using a series of roofing filters.
The bands are then gain adjusted recursively (in %) to match source as closely as possible at unity gain.
The recursive adjustment size can be changed using the "Gain Adjustment Increment" input, which will affect how tightly the resulting filter approximates source at unity.
The frequency range of each band is adjustable via the period inputs. In default settings, these are the ranges:
-> Low Shelf : 256+ Samples Per Cycle. This shelf is the largest trend component of the signal. Unlike the other bands and shelf, this shelf is not zero mean unless source data is.
-> Band 1 : 128 - 256 Samples Per Cycle. This band is a moderate trend and low cyclic component of the signal.
-> Band 2 : 64 - 128 Samples Per Cycle. This band is a mild trend and moderate cyclic component of the signal.
-> Band 3 : 32 - 64 Samples Per Cycle. This band is a high cyclic component of the signal.
-> Band 4 : 16 - 32 Samples Per Cycle. This band is a high cyclic component of the signal.
-> Band 5 : 8 - 16 Samples Per Cycle. This band is a moderate cyclic and mild to moderate noise component of the signal.
-> Band 6 : 4 - 8 Samples Per Cycle. This band is a high noise component of the signal.
-> High Shelf : 4- Samples Per Cycle. This shelf is primarily noise.
Each band and shelf can be manually gain adjusted via their respective inputs.

After EQ processing, each band and shelf is then optionally fed through my Peak Envelope Compressor function for dynamics control.
The compressor in this script works by reducing band power by a specified percentage when it exceeds a user defined percentage of the peak envelope.
The peak envelope measures maximum power of the band over its period range multiplied by a user defined integer.
There is an option included to apply Butterworth smoothing to the envelope as well, which will alter the shape of the compressor.
If you want an envelope that quickly responds to power peaks, use little to no smoothing. If you desire something more static, use a large smoothing period.
Attack and release are included in the algorithm to shape the sensitivity of the compressor.
Attack controls how many bars it takes from being triggered for attenuation to reach its target amount.
Release controls how many bars it takes from being un-triggered for attenuation to reach back to 0.
In addition, the compressor is equipped with parallel processing.
The "Parallel Mix" inputs control the amount of compressed vs non-compressed signal presence in the final output.
And of course, the compressor has a post-processing gain input (in %) to fine-tune the presence of the band.

For easy visual tuning, you can view each independent band's magnitude or power by selecting them in the display inputs.
This display setup can also be beneficial analytically if you wish to analyze specific frequency components of the source signal.

The default preset for this script is meant to show how versatile EQ filtering and compression can be for technical analysis.
The EQ preset detrends the data, moderately smooths the data, and emphasizes dominant cyclical ranges.
The compression preset provides fast, moderately heavy shaping to dial in dynamics and reduce transient effects.
The resulting curve is a great filter for responsively analyzing cyclical momentum.

The script is also fully equipped with outputs that can be used externally by other scripts.
You can integrate these external outputs with your own script by using a source input. Simply select the desired output from the dropdown tab on your script.

Multiband filtering and compression are concepts that are not conventionally used in the world of finance.
However, the versatile capabilities of these concepts make this a wonderful tool to have in the arsenal.
By surgically adjusting separate frequency components of a signal, you're able to design a wide variety of filters with unique responses for a vast array of applications.
Play around with the settings and see what kinds of filters you can design!

---------------------------------------------------------


This is a premium script, and access is granted on an invite-only basis.

To gain access, get a copy of the script overview, or for additional inquiries, send me a direct message.

I look forward to hearing from you!


---------------------------------------------------------

General Disclaimer:
Trading stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument has large potential rewards, but also large potential risk.
You must be aware of the risks and be willing to accept them in order to invest in stocks, futures, Forex, options, ETFs or cryptocurrencies.
Don’t trade with money you can’t afford to lose.
This is neither a solicitation nor an offer to Buy/Sell stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument.
No representation is being made that any account will or is likely to achieve profits or losses of any kind.
The past performance of any trading system or methodology is not necessarily indicative of future results.

---------------------------------------------------------

NOTE: Unlike standard tools of this nature in other applications, I scaled the signals in % rather than dB, mainly since it's proven so far to be more user-friendly to keep things linear on here.
In addition, no transitions to frequency domain are done in this script. This EQ is an experimental variant that processes in the time domain and relies on a network of roofing filters.
When changing cutoff periods, make sure they are organized in descending order with low shelf as the highest period, and high shelf as the lowest period.
Using non-descending lengths may result in an undesired output.
Lastly, when changing cutoff periods, parts of the spectrum may leak slightly differently between bands, so the "Gain Match Adjustment Increment" may need to be changed as well if you want it to match as closely as possible at unity.
Despite these shortcomings, this tool functions surprisingly well, especially with the default periods, and it's quickly become one of my favorites. I hope you all enjoy it!

For my full list of premium tools, check the blog:
wallanalytics.com/

Reach out on Telegram:
t.me/DonovanWall
仅限邀请脚本

仅限作者授权的用户访问此脚本,并且通常需要付费。您可以将其添加到收藏中,但是只有在向作者请求并获得许可之后,才能使用它。 请与DonovanWall联系以获取更多信息,或按照以下作者的说明进行操作。

在您100%信任脚本作者并了解脚本的工作原理之前,TradingView不建议您购买脚本并使用它。在很多情况下,您可以在我们的公共指标库中免费找到一个不错的开源替代品。

免责声明

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

想在图表上使用此脚本?

警告:请阅读,然后再请求访问权限。