Swing Failure Hunter
- Indicatori
- Versione: 1.25
- Aggiornato: 29 giugno 2026
- Attivazioni: 5
SFP Hunter is a MetaTrader 5 indicator that automatically detects Swing Failure Patterns (SFP) on any symbol and timeframe. The indicator identifies single-candle stop-hunt reversals where price wicks beyond a prior swing high or low and closes back inside on the same candle, signalling a potential reversal from that level.
How the Pattern Works
A Swing Failure Pattern occurs when price briefly breaches a prior swing high or swing low — triggering the stop orders clustered beyond that level — and then immediately reverses, closing back inside the prior structure on the same candle. This failure to sustain the breakout is the signal.
Bearish SFP (sell signal): Price wicks above a prior swing high and closes back below it on the same candle. The wick pierces the liquidity sitting above the swing; the bearish close confirms rejection.
Bullish SFP (buy signal): Price wicks below a prior swing low and closes back above it on the same candle. The wick sweeps the stops below the swing; the bullish close confirms support.
Detection Rules
The indicator applies the following rules to confirm a valid SFP candle:
- The candle wick must pierce the prior swing level by at least the minimum ATR threshold (configurable)
- The candle must close back on the opposite side of the prior level on the same bar
- The candle must have a real directional body — doji candles are excluded via the body ratio filter
- The rejection wick must be at least 50% of the body size, confirming the tail is the dominant feature
- The prior swing must fall within a configurable lookback window (minimum and maximum bar distance)
- An optional SuperTrend filter restricts bearish signals to downtrend conditions and bullish signals to uptrend conditions
Visual Output
When a valid SFP is detected, the indicator draws the following objects on the chart:
- Arrow — pointing down at the wick high (bearish SFP) or up at the wick low (bullish SFP)
- Zone rectangle — shaded area spanning from the prior swing to the SFP candle wick, highlighting the liquidity zone that was swept
- Reference line — dotted trendline connecting the prior swing to the SFP candle extreme
- Entry line — horizontal line at the SFP candle close price (your entry)
- SL line — horizontal line just beyond the SFP wick tip
- TP1 and TP2 lines — horizontal lines at configurable risk-reward multiples
- Swing High / Swing Low dots — optional dots marking all detected structure swings
- SuperTrend line — plots the current trend direction when the filter is active
Info Panel
A built-in on-chart panel displays the following information in real time:
- Last bullish and bearish signal with entry price, SL level, and TP1 level
- Current trade outcome (OPEN / WIN / LOSS) for the most recent signal of each direction
- Current ATR value in points
- SuperTrend direction and filter status
- Active filters summary
- Historical performance statistics: win rate, total closed trades, and total pips for both buy and sell signals separately
The panel can be minimised by clicking the collapse button.
Alerts
- On-screen alert when a new SFP is detected on the current bar close
- Push notification support for mobile MetaTrader alerts
- Alerts only fire on live bars, not during historical calculation
Input Parameters
Swing Detection
- Swing pivot lookback — number of bars on each side required to confirm a swing high or low (default: 5)
- Show swing high/low dots — toggles the swing structure dots on the chart
Pattern Selection
- Enable Double Bottom signals — enables bullish SFP detection
- Enable Double Top signals — enables bearish SFP detection
SFP Detection
- ATR period — period for the ATR used to scale wick penetration thresholds (default: 14)
- Min wick penetration — minimum wick beyond the prior swing expressed as ATR multiplier; filters out grazes (default: 0.3)
- Max wick penetration — maximum wick beyond the prior swing expressed as ATR multiplier; filters out runaway candles (default: 2.5)
- Body ratio — minimum ratio of the candle body to the total candle range; excludes doji candles (default: 0.35)
- Min bars between signals — minimum bar gap before a new signal of the same direction can fire (default: 10)
Prior Swing Reference Level
- Min bars between SFP candle and prior swing — how close the prior swing can be; prevents matching the immediately adjacent bar (default: 10)
- Max bars to look back for prior swing — the furthest back the indicator searches for a prior swing (default: 200)
SuperTrend Filter
- Enable SuperTrend directional filter — when enabled, bearish SFPs only fire in downtrend and bullish SFPs only fire in uptrend
- ATR period for SuperTrend — ATR period for the SuperTrend calculation (default: 14)
- SuperTrend multiplier — band width multiplier (default: 3.0)
- Bull / Bear line colour — colours for the SuperTrend trend lines
- Line width — SuperTrend line width
Visuals
- Bullish / Bearish arrow colour — colours for the signal arrows
- Arrow size — size of signal arrows (1 to 5)
- Draw zone rectangles — toggles the shaded liquidity zone rectangles
- Bull / Bear zone fill colour — fill colours for the zone rectangles
- Draw reference line — toggles the dotted line from prior swing to SFP wick
SL / TP Lines
- Draw Entry / SL / TP lines — toggles the horizontal level lines
- Level extend bars — how many bars the level lines extend to the right (default: 40)
- SL distance multiplier — minimum SL distance as ATR multiplier; SL is placed just above the wick tip and expands to this minimum if needed (default: 1.5)
- TP1 risk-reward ratio — TP1 target as a multiple of the SL distance (default: 1.0)
- TP2 risk-reward ratio — TP2 target as a multiple of the SL distance (default: 2.0)
- Line style, width, and colour options for each level
Info Panel
- Show info panel — toggles the panel
- Panel X / Y position — pixel offset from the top-left corner of the chart
Alerts
- Alert on new signal — enables on-screen alerts
- Push notification on new signal — enables mobile push notifications
Usage Notes
- Works on all symbols and all timeframes
- Entry is taken at the close of the SFP candle
- Stop loss is placed just beyond the tip of the SFP wick with a small ATR buffer
- The minimum SL distance input acts as a floor — if the natural wick-to-entry distance is smaller than the configured multiplier, the SL expands to that minimum
- The indicator does not repaint; signals are only confirmed on closed candles
- The performance panel tracks historical signal outcomes against the configured TP1 and TP2 targets for reference only; past results on historical bars do not guarantee future results
- All drawn objects are removed automatically when the indicator is removed from the chart
Important Notice
This indicator is a technical analysis tool that identifies price patterns. It does not constitute financial advice and does not guarantee profitable results. All trading involves risk. Test thoroughly on a demo account before any live use. Past pattern performance displayed in the info panel is based on historical price data only.
