OPEN-SOURCE SCRIPT
[SkuldX] SFP Swing Failure Pattern

SkuldX Swing Failure Pattern — Institutional Liquidity Sweep Detector
by SkuldX Trading Systems
What is it?
SkuldX Swing Failure Pattern automatically detects one of the most powerful reversal setups in Smart Money and ICT trading. The Swing Failure Pattern occurs when price sweeps beyond a key swing level — triggering stop-loss orders clustered there — but then closes back within the previous range. This signals that institutional participants have absorbed the available liquidity and are now positioning in the opposite direction.
Unlike random false breakouts, the SFP has a precise structure: a meaningful wick beyond a swing high or low, a close that returns inside the range, and a visible rejection zone where the liquidity grab occurred. SkuldX SFP identifies all three automatically and displays them directly on the chart.
The mechanics
Every swing high and swing low acts as a magnet for stop-loss orders. Retail traders who are long place their stops just below swing lows. Retail traders who are short place their stops just above swing highs. Institutional participants know exactly where this liquidity sits.
An SFP forms when price is deliberately pushed beyond one of these levels to trigger those orders — collecting the liquidity — and then immediately reverses. The result is a candle with a long wick beyond the level and a close that returns inside the prior range. This is not a random failure. It is a deliberate liquidity grab followed by institutional repositioning in the opposite direction.
Two pattern types
🔴 Bearish SFP — price sweeps above a previous swing high with a wick but closes below it. The failed attempt to break higher signals that sellers have absorbed the bullish liquidity and are now in control. Expect a move downward.
🟢 Bullish SFP — price sweeps below a previous swing low with a wick but closes above it. The failed breakdown signals that buyers have absorbed the bearish liquidity and are now driving price higher.
What you see on the chart
Each detected SFP displays three visual elements simultaneously:
Label — appears above or below the candle with the signal direction and the exact price of the swept level. Instantly identifies the pattern without manual analysis.
Dashed line — marks the swing level that was breached. Extends from the beginning of the lookback window to the right, showing which structural level triggered the sweep. This level often acts as support or resistance in subsequent price action.
Rejection zone (box) — shaded area between the wick extreme and the swept level. This is the liquidity grab zone — the price range where stop orders were triggered and institutional positions were built. The size of this zone reflects how aggressively price was pushed beyond the level before reversing.
Quality filters
Two independent filters prevent low-quality signals from appearing on the chart.
Min Wick Size % of candle — requires the rejection wick to be at least a specified percentage of the total candle range. A small wick relative to the candle body suggests weak rejection. Default 0.5%. Increase to 2–3% on noisy instruments to require a more decisive rejection.
Min Breach Size % of level — requires the wick to extend at least a specified percentage beyond the swing level. A sweep that barely ticks beyond the level carries less significance than one that pushes meaningfully through it. Default 0.05%. Increase to 0.1–0.2% for stricter confirmation.
Both filters can be set to zero to show all detected patterns without filtering.
Settings reference
Swing Lookback (bars) — defines how many bars back to search for the swing high or low that gets swept. Default 10. Lower values find more local patterns, higher values require more significant swing levels. On 15m charts, 10 bars covers approximately 2.5 hours of price history.
Min Wick Size % of candle — minimum upper or lower wick as a percentage of the total candle range
Min Breach Size % of level — minimum distance the wick must extend beyond the swing level
Show Bullish / Bearish SFP — independent toggles for each direction
Show Labels — toggles the signal label above or below the candle
Show Level Line — toggles the dashed line at the swept swing level
Show Rejection Zone — toggles the shaded box between the wick and the level
Zone Extend — how many bars to the right the zone and line extend
Label Size — tiny, small, or normal
Bullish / Bearish Color — independent color control for each direction
Zone Transparency — opacity of the rejection zone fill
Line Width — thickness of the swept level line
Data Window
Hovering over any bar shows binary flags for Bullish SFP and Bearish SFP detection, the current swing high and swing low values used as reference levels, the upper and lower wick percentages, and the breach percentage of the swept level. These values are useful for calibrating the quality filters to your specific instrument and timeframe.
How to use it in practice
Entry timing — the SFP signal fires on the bar where the rejection occurs. The most aggressive entry is at the close of that candle. A more conservative approach is to wait for the next candle to confirm continuation in the reversal direction before entering.
Stop placement — place the stop-loss beyond the wick extreme, outside the rejection zone. The wick tip represents the furthest point of institutional manipulation — price returning beyond it invalidates the pattern.
Take-profit targets — common targets are the opposite swing extreme, a session High or Low from the current day, or the next significant structural level. The swept swing level itself often acts as resistance or support on the retest.
Timeframe selection — SFP signals are most reliable on 15m and above. On very low timeframes the pattern appears frequently but with lower conviction. On 1h and 4h the signals are rarer but carry significantly more institutional weight.
Confluence — the highest-probability SFP setups occur when the swept level coincides with a session boundary. A bearish SFP that sweeps the Asian High during London session is a classic institutional liquidity grab setup. A bullish SFP at Asian Low during the NY Overlap is one of the strongest intraday reversal signals available.
Volume context — a sweep accompanied by above-average volume confirms institutional participation. A low-volume sweep may indicate a thin market move rather than a deliberate liquidity grab.
Common mistakes to avoid
Entering immediately on the wick without waiting for the candle to close. The pattern is only valid after the close confirms the rejection — a candle that is still forming may yet close beyond the level as a genuine breakout.
Trading every SFP signal regardless of context. The pattern is significantly more reliable when it sweeps a level that has been respected multiple times previously, when it occurs during a high-liquidity session window, and when it aligns with the broader directional bias.
Using too small a lookback. A swing high from 3 bars ago carries far less liquidity than one from 10–15 bars ago. Increase the lookback if signals feel too frequent or structurally insignificant.
Built for SkuldX ecosystem
SkuldX Swing Failure Pattern is designed to work alongside the full SkuldX indicator suite. The most reliable SFP setups emerge when multiple layers of context align simultaneously:
by SkuldX Trading Systems
What is it?
SkuldX Swing Failure Pattern automatically detects one of the most powerful reversal setups in Smart Money and ICT trading. The Swing Failure Pattern occurs when price sweeps beyond a key swing level — triggering stop-loss orders clustered there — but then closes back within the previous range. This signals that institutional participants have absorbed the available liquidity and are now positioning in the opposite direction.
Unlike random false breakouts, the SFP has a precise structure: a meaningful wick beyond a swing high or low, a close that returns inside the range, and a visible rejection zone where the liquidity grab occurred. SkuldX SFP identifies all three automatically and displays them directly on the chart.
The mechanics
Every swing high and swing low acts as a magnet for stop-loss orders. Retail traders who are long place their stops just below swing lows. Retail traders who are short place their stops just above swing highs. Institutional participants know exactly where this liquidity sits.
An SFP forms when price is deliberately pushed beyond one of these levels to trigger those orders — collecting the liquidity — and then immediately reverses. The result is a candle with a long wick beyond the level and a close that returns inside the prior range. This is not a random failure. It is a deliberate liquidity grab followed by institutional repositioning in the opposite direction.
Two pattern types
🔴 Bearish SFP — price sweeps above a previous swing high with a wick but closes below it. The failed attempt to break higher signals that sellers have absorbed the bullish liquidity and are now in control. Expect a move downward.
🟢 Bullish SFP — price sweeps below a previous swing low with a wick but closes above it. The failed breakdown signals that buyers have absorbed the bearish liquidity and are now driving price higher.
What you see on the chart
Each detected SFP displays three visual elements simultaneously:
Label — appears above or below the candle with the signal direction and the exact price of the swept level. Instantly identifies the pattern without manual analysis.
Dashed line — marks the swing level that was breached. Extends from the beginning of the lookback window to the right, showing which structural level triggered the sweep. This level often acts as support or resistance in subsequent price action.
Rejection zone (box) — shaded area between the wick extreme and the swept level. This is the liquidity grab zone — the price range where stop orders were triggered and institutional positions were built. The size of this zone reflects how aggressively price was pushed beyond the level before reversing.
Quality filters
Two independent filters prevent low-quality signals from appearing on the chart.
Min Wick Size % of candle — requires the rejection wick to be at least a specified percentage of the total candle range. A small wick relative to the candle body suggests weak rejection. Default 0.5%. Increase to 2–3% on noisy instruments to require a more decisive rejection.
Min Breach Size % of level — requires the wick to extend at least a specified percentage beyond the swing level. A sweep that barely ticks beyond the level carries less significance than one that pushes meaningfully through it. Default 0.05%. Increase to 0.1–0.2% for stricter confirmation.
Both filters can be set to zero to show all detected patterns without filtering.
Settings reference
Swing Lookback (bars) — defines how many bars back to search for the swing high or low that gets swept. Default 10. Lower values find more local patterns, higher values require more significant swing levels. On 15m charts, 10 bars covers approximately 2.5 hours of price history.
Min Wick Size % of candle — minimum upper or lower wick as a percentage of the total candle range
Min Breach Size % of level — minimum distance the wick must extend beyond the swing level
Show Bullish / Bearish SFP — independent toggles for each direction
Show Labels — toggles the signal label above or below the candle
Show Level Line — toggles the dashed line at the swept swing level
Show Rejection Zone — toggles the shaded box between the wick and the level
Zone Extend — how many bars to the right the zone and line extend
Label Size — tiny, small, or normal
Bullish / Bearish Color — independent color control for each direction
Zone Transparency — opacity of the rejection zone fill
Line Width — thickness of the swept level line
Data Window
Hovering over any bar shows binary flags for Bullish SFP and Bearish SFP detection, the current swing high and swing low values used as reference levels, the upper and lower wick percentages, and the breach percentage of the swept level. These values are useful for calibrating the quality filters to your specific instrument and timeframe.
How to use it in practice
Entry timing — the SFP signal fires on the bar where the rejection occurs. The most aggressive entry is at the close of that candle. A more conservative approach is to wait for the next candle to confirm continuation in the reversal direction before entering.
Stop placement — place the stop-loss beyond the wick extreme, outside the rejection zone. The wick tip represents the furthest point of institutional manipulation — price returning beyond it invalidates the pattern.
Take-profit targets — common targets are the opposite swing extreme, a session High or Low from the current day, or the next significant structural level. The swept swing level itself often acts as resistance or support on the retest.
Timeframe selection — SFP signals are most reliable on 15m and above. On very low timeframes the pattern appears frequently but with lower conviction. On 1h and 4h the signals are rarer but carry significantly more institutional weight.
Confluence — the highest-probability SFP setups occur when the swept level coincides with a session boundary. A bearish SFP that sweeps the Asian High during London session is a classic institutional liquidity grab setup. A bullish SFP at Asian Low during the NY Overlap is one of the strongest intraday reversal signals available.
Volume context — a sweep accompanied by above-average volume confirms institutional participation. A low-volume sweep may indicate a thin market move rather than a deliberate liquidity grab.
Common mistakes to avoid
Entering immediately on the wick without waiting for the candle to close. The pattern is only valid after the close confirms the rejection — a candle that is still forming may yet close beyond the level as a genuine breakout.
Trading every SFP signal regardless of context. The pattern is significantly more reliable when it sweeps a level that has been respected multiple times previously, when it occurs during a high-liquidity session window, and when it aligns with the broader directional bias.
Using too small a lookback. A swing high from 3 bars ago carries far less liquidity than one from 10–15 bars ago. Increase the lookback if signals feel too frequent or structurally insignificant.
Built for SkuldX ecosystem
SkuldX Swing Failure Pattern is designed to work alongside the full SkuldX indicator suite. The most reliable SFP setups emerge when multiple layers of context align simultaneously:
- A bullish SFP at the Asian Low after the Asian session closes — detected by SkuldX Trading Sessions — suggests institutional accumulation before London or NY drives price higher
- A bearish SFP at the Asian High during London session with ADR Used % above 80% — from SkuldX ADR Levels — indicates both a liquidity sweep and statistical range exhaustion at the same level
- An SFP confirmed by a Bullish Trend or Bearish Trend reading in SkuldX OI Delta adds institutional conviction — new positions opening in the reversal direction confirm the sweep was not random
- An SFP that forms at a level already flagged by SkuldX Level Patterns as a multi-touch support or resistance zone carries significantly more weight than one at a fresh untested level
- Each indicator in the suite adds an independent dimension of confirmation. Using them together reduces noise and improves the quality of setups without adding complexity to the decision process.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Visit skuldxtrade.com to learn more about SkuldX Trading Systems.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Visit skuldxtrade.com to learn more about SkuldX Trading Systems.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.