DonovanWall

Fractal Regression Bands [DW]

DonovanWall Wizard Updated   
This study is an experimental regression curve built around fractal and ATR calculations.
First, Williams Fractals are calculated, and used as anchoring points.
Next, high anchor points are connected to negative sloping lines, and low anchor points to positive sloping lines. The slope is a specified percentage of the current ATR over the sampling period.
The median between the positive and negative sloping lines is then calculated, then the best fit line (linear regression) of the median is calculated to generate the basis line.
Lastly, a Golden Mean ATR is taken of price over the sampling period and multiplied by 1/2, 1, 2, and 3. The results are added and subtracted from the basis line to generate the bands.

Williams Fractals are included in the plots. The color scheme indicated whether each fractal is engulfing or non-engulfing.

Custom bar color scheme is included.
Release Notes:
Updates:

Due to inefficiencies and its arbitrary nature, the slope factor calculation has been removed from the script.

Due to the linear regression's significant amount of overshoot, especially at greater sampling lengths, the basis line is now calculated using exponential smoothing, which fits the price series much better with minimal overshoot.

Changed the size of the fractal signals.

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

Reach out on Telegram:
t.me/DonovanWall
Open-source script

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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?