OPEN-SOURCE SCRIPT

[SkuldX] SFP + Auto S&R

1 051
SkuldX SFP + Auto S&R — Institutional Liquidity Sweep at Validated Structure
by SkuldX Trading Systems

What is it?
SkuldX SFP + Auto S&R combines two powerful concepts into a single indicator. It automatically identifies significant support and resistance levels by clustering historical pivot points — and then monitors those levels exclusively for Swing Failure Pattern events. The result is a significantly higher quality signal filter compared to standard SFP detection: every sweep you see on the chart is happening at a price level where the market has already demonstrated structural significance multiple times.

The problem with standard SFP detection
A basic SFP indicator sweeps any local high or low regardless of whether that level has any structural importance. This generates many signals at noise levels that institutions have no reason to target. The most powerful SFP setups occur specifically at levels where liquidity has accumulated over time — where stop orders from multiple previous reactions are clustered and waiting to be harvested.
SkuldX SFP + Auto S&R solves this by only triggering when a sweep occurs at an automatically validated S&R cluster.

How the S&R engine works
The indicator scans the configured history window and identifies all pivot highs and lows — price points where the market reversed direction with enough significance to form a clear swing. These pivots are then grouped into clusters: any two pivots within the cluster tolerance percentage of each other are merged into a single level, and their average price becomes the cluster center.
Each cluster is assigned a touch count — the total number of times price has visited that zone across both pivot formations and raw bar touches. Clusters that meet the minimum touch threshold become validated S&R levels and are drawn on the chart as horizontal lines.
The levels are sorted by touch count and only the strongest ones up to your configured maximum are shown. A label at the right edge of each line displays the price and touch count in brackets — for example 2415.50 [5T] means that level has been touched five times and carries significant institutional memory.

How the SFP detection works
On every bar the indicator identifies the nearest validated S&R level above price and the nearest validated S&R level below price. It then checks whether the current candle has swept through either of those levels while closing back inside them.
Bearish SFP fires when the candle wick extends above the nearest S&R resistance level but the candle closes below it. The upper wick must meet the minimum size threshold as a percentage of the total candle range, and the breach above the level must meet the minimum breach threshold. Both conditions together ensure the sweep was meaningful rather than a minor tick-through.
Bullish SFP fires when the candle wick extends below the nearest S&R support level but the candle closes above it, with the lower wick and breach both meeting their minimum thresholds.

What you see on the chart
Grey lines — validated S&R levels with touch count labels. These are your structural reference zones. The more touches a level shows, the more liquidity has accumulated there and the more significant a sweep of that level becomes.
SFP label — appears above or below the candle at the moment of detection. Shows the signal direction, the price of the swept level, and its touch count. Higher touch count at the swept level means higher probability of a sustained reversal.
Rejection zone (box) — shaded area between the wick extreme and the S&R level. This is the precise zone where stop orders were triggered and institutional positions were likely built. The zone extends to the right for a configurable number of bars.
Dashed line — marks the specific S&R level that was swept, making it easy to track which structural zone triggered the signal.

Settings reference
S&R Detection group
Pivot Lookback — how many bars on each side a pivot must be the extreme to qualify. Higher values find more significant swing points but confirm later. Default 10.
Cluster Tolerance % — maximum distance between two pivots to be grouped into the same cluster. Default 0.3%. Increase for volatile instruments where price rarely touches the exact same price twice.
Min Touches for Valid Level — minimum touch count required for a cluster to be drawn and used for SFP detection. Default 2. Increase to 3 or 4 for stricter structural requirements.
Max Levels to Show — limits the number of S&R lines displayed. The strongest levels by touch count are always shown first.
S&R History Lookback — how many bars of history to scan for pivots. Default 300. Increase for higher timeframes where significant levels form slowly.

SFP Filters group
Min Wick Size % of candle — the rejection wick must be at least this percentage of the total candle range. Prevents weak rejections from triggering signals.
Min Breach Size % of level — the wick must extend at least this percentage beyond the S&R level. Ensures the sweep was meaningful enough to trigger stop orders.
Show Bullish / Bearish SFP — independent toggles for each direction.

SFP Display group
Show Labels — toggles signal labels
Show Rejection Zone — toggles the sweep zone box
Zone Extend — how many bars right the zone and line extend
Label Size / Zone Transparency / Line Width — visual customization
Bullish / Bearish Color — independent colors for each direction

How to use it in practice
Reading the levels — scan the grey S&R lines before any signal appears. Levels with 4+ touches are the most significant targets. These are where institutions are most likely to engineer a sweep. When price approaches one of these levels, heighten your attention.
Reading the signal — when an SFP fires, check the touch count in the label. A sweep at a 2-touch level is interesting. A sweep at a 6-touch level is significant. The touch count is the single most important quality indicator for the setup.
Entry timing — the signal fires on candle close. The most direct entry is at the open of the next candle in the reversal direction. A more conservative approach waits for the following candle to confirm continuation before entering.
Stop placement — place the stop-loss beyond the wick tip, outside the rejection zone. The zone itself tells you where institutional positioning occurred — price returning beyond that zone invalidates the entire setup premise.
Take-profit targets — use the next S&R level in the direction of the trade as the primary target. The indicator shows you all significant levels simultaneously, making it straightforward to identify the next structural obstacle.
Calibrating for your instrument — start with default settings and observe whether signals appear at levels that look structurally significant to you visually. If too many signals appear at noise levels, increase Min Touches to 3 or raise the wick and breach thresholds. If signals are too rare, reduce Pivot Lookback or increase Cluster Tolerance.
Timeframe guidance — on 15m the lookback of 300 bars covers approximately 75 hours. On 1h it covers 12.5 days. Adjust S&R History Lookback proportionally to ensure the indicator scans enough price history to build meaningful clusters.
Part of the SkuldX Suite

SkuldX SFP + Auto S&R is designed to work alongside the full SkuldX indicator suite. The most reliable setups emerge when multiple layers of context align:
  • A bullish SFP at a 4+ touch S&R level that coincides with the Asian Low from SkuldX Sessions carries double structural significance — both the automated cluster and the session boundary agree on the level
  • A bearish SFP at a high-touch resistance zone with ADR Used % above 85% from SkuldX ADR Levels signals both a liquidity sweep and statistical range exhaustion simultaneously
  • An SFP confirmed by a Bullish or Bearish Trend reading in SkuldX OI Delta — new positions opening in the reversal direction — adds institutional conviction that the sweep was deliberate rather than random
  • The touch count shown in the SFP label directly complements the Touch Counter module in SkuldX Level Patterns, providing consistent structural analysis across both manual and automated level detection

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.