The indicator works in three stages: Prefiltering, Length Adaptation and Moving Averages.
Prefiltering is a fast smoothing to get rid of high-frequency (2, 3 or 4 bar) noise.
Adaptation algorithms are roughly subdivided in two categories: classic Length Adaptations and Cycle Estimators (they are also implemented in separate libraries), all are selected in Adaptation dropdown. Length Adaptation used in the Adaptive Moving Averages and the Adaptive Oscillators try to follow price movements and accelerate/decelerate accordingly (usually quite rapidly with a huge range). Cycle Estimators, on the other hand, try to measure the cycle period of the current market, which does not reflect price movement or the (the may also differ depending on the cycle phase, but the cycle period itself usually changes slowly).
- Chande (Price) - based on Chande's (CDMI or DYMOI), which is dynamic with this length
- Chande ( ) - a variant of Chande's algorithm, where is used instead of price
- VIDYA - based on algorithm. The period oscillates from the Lower Bound up (slow)
- VIDYA-RS - based on Vitali Apirine's modification of algorithm (he calls it Moving Average). The period oscillates from the Upper Bound down (fast)
- Kaufman Efficiency Scaling - based on Efficiency Ratio calculation originally used in
- Deviation Scaling - based on DSSS by John F.
- Median Average - based on Median Average Adaptive Filter by John F.
- Fractal Adaptation - based on by John F.
- MESA Alpha - based on by John F.
- MESA Cycle - based on by John F. , but unlike Alpha calculation, this adaptation estimates cycle period
- Pearson Autocorrelation* - based on Pearson Autocorrelation Periodogram by John F.
- DFT Cycle* - based on Discrete Fourier Transform Spectrum estimator by John F.
- Phase Accumulation* - based on Dominant Cycle from Phase Accumulation by John F.
Length Adaptation usually take two parameters: Bound From (lower bound) and To (upper bound). These are the limits for Adaptation values. Note that the Cycle Estimators marked with asterisks(*) are very computationally intensive, so the bounds should not be set much higher than 50, otherwise you may receive a timeout error (also, it does not seem to be a useful thing to do, but you may correct me if I'm wrong).
The Cycle Estimators marked with asterisks(*) also have 3 checkboxes: HP (Highpass Filter), SS (Super Smoother) and HW (Hann Window). These enable or disable their internal prefilters, which are recommended by their author - John F. . I do not know, which combination works best, so you can experiment.
Chande's Adaptations also have 3 additional parameters: SD Length (lookback length of Standard deviation), Smooth (smoothing length of Standard deviation) and Power ( exponent of the length adaptation - lower is smaller variation). These are internal tweaks for the calculation.
Length Adaptaton section offer you a choice of Moving Average algorithms. Most of the Adaptations are originally used with , so this is a good starting point for exploration.
- SMA -
- RMA - Running Moving Average
- EMA -
- HMA -
- VWMA -
- 2-pole Super Smoother - 2-pole Super Smoother by John F.
- 3-pole Super Smoother - 3-pole Super Smoother by John F.
- Filt11 -a variant of 2-pole Super Smoother with error averaging for zero-lag response by John F.
- Triangle Window - Triangle Window Filter by John F.
- Hamming Window - Hamming Window Filter by John F.
- Hann Window - Hann Window Filter by John F.
- Lowpass - removes cyclic components shorter than length (Price - Highpass)
- DSSS - Derivation Scaled Super Smoother by John F.
There are two Moving Averages that are drown on the chart, so length for both needs to be selected. If no Adaptation is selected (None option), you can set Fast Length and Slow Length directly. If an Adaptation is selected, then Cycle multiplier can be selected for Fast and Slow MA.
More information on the algorithms is given in the code for the libraries used. I am also very grateful to other TradingView community members (they are also mentioned in the library code) without whom this script would not have been possible.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.