OPEN-SOURCE SCRIPT

Fractal Wave Hunter [JOAT]

599

Fractal Wave Hunter [JOAT] - Multi-Method Fractal Detection System

Introduction and Purpose

Fractal Wave Hunter is an open-source overlay indicator that identifies key reversal patterns using multiple fractal detection methods. The core problem this indicator solves is that different fractal methods catch different types of reversals. Williams' classic 5-bar fractal is reliable but slow; Hougaard's 4-bar method is faster but noisier. Using only one method means missing valid signals that the other would catch.

This indicator addresses that by combining both methods plus HOLP/LOHP detection, giving traders a comprehensive view of potential reversal points.

Why These Methods Work Together

Each fractal method has different characteristics:

1. 4-Bar Fractal (Hougaard Method) - Faster detection, identifies momentum shifts when close exceeds recent highs/lows. Best for catching early reversals.

2. Classic 5-Bar Fractal (Williams) - Traditional pivot detection requiring the middle bar to be the highest/lowest of 5 bars. Best for identifying significant swing points.

3. HOLP/LOHP - High of Low Period and Low of High Period signals identify when price makes a new extreme within a defined lookback. Best for trend exhaustion detection.

By combining these methods, traders can:
  • Use 4-bar fractals for early entry signals
  • Use 5-bar fractals for confirmation and stop placement
  • Use HOLP/LOHP for trend exhaustion warnings


How the Detection Works

4-Bar Fractal (Hougaard):
Pine Script®
bool fractal4BuyBase = close > high[1] and close > high[3] bool fractal4SellBase = close < low[1] and close < low[3]


Classic 5-Bar Fractal:
Pine Script®
bool fractalHigh = high[2] > high[4] and high[2] > high[3] and high[2] > high[1] and high[2] > high[0] bool fractalLow = low[2] < low[4] and low[2] < low[3] and low[2] < low[1] and low[2] < low[0]


Signal Types

  • 4B (4-Bar Buy) - Close exceeds high[1] and high[3] - early bullish signal
  • 4S (4-Bar Sell) - Close below low[1] and low[3] - early bearish signal
  • FH (Fractal High) - Classic 5-bar swing high - confirmed resistance
  • FL (Fractal Low) - Classic 5-bar swing low - confirmed support
  • HOLP - High of low period - potential bullish exhaustion
  • LOHP - Low of high period - potential bearish exhaustion


Dashboard Information
  • 4-Bar Fractal - Count of bullish/bearish 4-bar fractals
  • Classic Fractal - Count of 5-bar fractal highs/lows
  • HOLP/LOHP - Reversal signal counts
  • Total Signals - Combined pattern count


How to Use This Indicator

For Counter-Trend Entries:
1. Wait for 4-bar fractal signal at key support/resistance
2. Confirm with 5-bar fractal forming nearby
3. Enter with stop beyond the fractal point

For Stop Placement:
1. Use 5-bar fractal highs/lows as stop-loss references
2. These represent confirmed swing points that should hold if trend continues

For Trend Analysis:
1. Track swing structure using fractal highs and lows
2. Higher fractal lows = uptrend structure
3. Lower fractal highs = downtrend structure

Input Parameters
  • Show 4-Bar Fractals (true) - Toggle Hougaard method signals
  • Show Classic Fractals (true) - Toggle Williams method signals
  • Show HOLP/LOHP (true) - Toggle exhaustion signals
  • ATR Filter (false) - Only show signals during volatile conditions
  • Swing Lines (true) - Connect significant swing points


Timeframe Recommendations
  • 1H-Daily: Best for reliable fractal detection
  • 15m-30m: More signals but higher noise
  • Weekly: Fewer but more significant fractals


Limitations
  • 5-bar fractals have inherent 2-bar lag (need confirmation)
  • 4-bar fractals can produce false signals in choppy markets
  • HOLP/LOHP signals work best at trend extremes
  • Not all fractals lead to significant reversals


Open-Source and Disclaimer

This script is published as open-source under the Mozilla Public License 2.0 for educational purposes.

This indicator does not constitute financial advice. Fractal detection does not guarantee reversals. Always use proper risk management.

- Made with passion by officialjackofalltrades

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.