EclipsePhage

A Better Fractal (Williams)

DESCRIPTION:
This is a more advanced version of the classic Williams Fractal algo, using a looped barindex iterator to examine highs/lows.
You may choose ideal or regular fractals, along with the amount of bars (periods) used to calculate; the minimum being 3. Oddnums only.
Ideal fractals = fractals with each bar needing to be lower/higher than the preceding bar, with the midbar at the apex.
Regular fractals = the typical Williams fractal, wherein each bar only has to be lower/higher than the midbar (apex) only.
How to trade? Combine with other indicators and use breakout or reversal strategies, typically. Set buy/sell stops at the high/low of a fractal, for instance
... to trade the breakout when it occurs. Or, track momentum when a fractal prints and trade accordingly. Or perhaps trade with the alligator or 3 EMA.
Experiment with different types of fractals to achieve the desired result, with higher period fractals obviously offering more solid indication though with higher lag.

Note: A fractal does not print until n/2 (rounded down) bars after, where n = the period you chose.
Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
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?