P
PipsGrowth

Key Takeaways

Difficulty:Intermediate
Reliability:Moderate
Category:advanced
Timeframes:1H, 4H, Daily

Williams Fractals

advancedšŸ“Š 1H, 4H, Daily

Five-bar pattern identifying local highs and lows as potential reversals.

Formula

Code
Up Fractal: Bar has highest high with 2 lower highs on each side
Down Fractal: Bar has lowest low with 2 higher lows on each side

Detailed Explanation

Williams Fractals identify turning points in price using a 5-bar pattern.

**Pattern:** - Up Fractal: Middle bar has highest high, with two lower highs on each side - Down Fractal: Middle bar has lowest low, with two higher lows on each side

šŸ“ˆ Bullish Signals

Price breaks above up fractal with Alligator confirmation

šŸ“‰ Bearish Signals

Price breaks below down fractal with Alligator confirmation

Python Implementation

Basic fractal detection

Python
def fractals(df):
df['fractal_up'] = (df['high'] > df['high'].shift(1)) & (df['high'] > df['high'].shift(2)) & (df['high'] > df['high'].shift(-1)) & (df['high'] > df['high'].shift(-2))
df['fractal_down'] = (df['low'] < df['low'].shift(1)) & (df['low'] < df['low'].shift(2)) & (df['low'] < df['low'].shift(-1)) & (df['low'] < df['low'].shift(-2))
return df

TradingView Pine Script

JavaScript
//@version=5
indicator("Fractals", overlay=true)
up = ta.pivothigh(high, 2, 2)
down = ta.pivotlow(low, 2, 2)
plotshape(up, style=shape.triangleup, location=location.abovebar, color=color.green)
plotshape(down, style=shape.triangledown, location=location.belowbar, color=color.red)
šŸ“Š Use TradingView for Advanced Charting
Professional analysis tools with 100+ technical indicators
Get TradingView Pro

MT5 MQL5 Code

C++
int fractal_handle = iFractals(_Symbol, _Period);
double up_fractal[], down_fractal[];
CopyBuffer(fractal_handle, 0, 0, 100, up_fractal);
CopyBuffer(fractal_handle, 1, 0, 100, down_fractal);

Common Mistakes

āœ—Trading fractals in isolation
āœ—Not waiting for confirmation bars

Confirmation Signals

Alligator indicator
Price breaks fractal level
Volume

Best For

Swing point identificationStop placementBill Williams strategies

šŸ’” Pro Tips

  • •Part of Bill Williams system
  • •Fractals appear after 2 bars of confirmation
  • •Best combined with Alligator indicator
Last updated: December 29, 2024

Educational Disclaimer

This content is for educational purposes only and does not constitute financial or investment advice. Trading involves significant risk and you may lose your capital. Always consult a licensed financial advisor before making investment decisions.

Frequently Asked Questions