PROTECTED SOURCE SCRIPT
Mis à jour SFP SCANNERV2

==============================
📌 SFP SCANNER — QUICK GUIDE (EN)
==============================
🎯 Goal
Automatically scan Swing Failure Patterns (SFPs) on pivot-based support and resistance levels, using a multi-timeframe, structural and filterable approach.
👉 This indicator is designed to be mainly used with alerts on watchlists.
The more permissive the filters are, the more signals (and noise) you will get.
--------------------------------------------------
🧱 1) Pivot Levels — Pivot Timeframe
--------------------------------------------------
Levels are built using classic pivots.
Settings:
• Pivot timeframe: timeframe used to compute pivots (e.g. 4H)
• Pivot source:
- Wicks = highs / lows
- Closes = closing prices
• Left / Right: number of bars required to validate a pivot
➡️ A pivot is confirmed only after “Right” bars.
👉 Recommendation: minimum 15 / 15 on H4.
--------------------------------------------------
🎨 Level Display
--------------------------------------------------
• Pivot High → resistances
• Pivot Low → supports
• Colors, width and style are visual-only settings
--------------------------------------------------
📍 2) SFP Detection — Counting Timeframe
--------------------------------------------------
SFPs are detected on the “Counting timeframe”, regardless of the chart timeframe.
Bearish SFP (resistance):
1) Close above the level (breakout)
2) Close back below the level (reclaim)
3) Breakout duration must respect:
- Min bars breakout
- Max bars breakout
(counted in counting timeframe bars)
Bullish SFP (support):
Mirrored logic:
1) Break below
2) Reclaim above
3) Min / Max bars respected
--------------------------------------------------
🧠 3) Trend Filter — Moving Averages (optional)
--------------------------------------------------
If enabled:
• MA50 > MA200 → only Bullish SFPs allowed
• MA50 < MA200 → only Bearish SFPs allowed
Settings:
• MA timeframe:
- Blank = counting timeframe
- Recommended: pivot timeframe
• MA type: SMA or EMA
• Fast / Slow MA: default 50 / 200
--------------------------------------------------
🧱 4) Structural Support / Resistance Filter
--------------------------------------------------
This filter is independent from the MA filter.
Structure pivots count (N):
• Number of consecutive supports / resistances used to validate structure.
Checkbox logic (restrictive):
👉 If no checkbox is selected → all SFPs are allowed.
Bullish SFPs allowed if:
• Supports are rising
• Resistances are rising
Bearish SFPs allowed if:
• Resistances are falling
• Supports are falling
➡️ Each checkbox acts as an independent restriction.
At least one selected condition must be true to allow the SFP.
--------------------------------------------------
🛑 5) Anti-spam
--------------------------------------------------
• One-shot per level
➡️ Once triggered, the level is considered consumed.
--------------------------------------------------
🔎 6) Levels to Scan
--------------------------------------------------
• Number of recent pivot levels (supports + resistances) checked for SFP detection.
--------------------------------------------------
🕒 7) Multi-timeframe Display
--------------------------------------------------
Regardless of the chart timeframe:
• Chart > Counting timeframe:
A lower-timeframe SFP is displayed on the higher-timeframe candle.
• Chart = Counting timeframe:
The SFP appears directly on the candle at close.
• Chart < Counting timeframe:
The signal is displayed at the opening of the next counting timeframe candle.
--------------------------------------------------
🔔 TradingView Alerts
--------------------------------------------------
• Bullish SFP
• Bearish SFP
--------------------------------------------------
⚙️ Suggested Settings (Day trading / 1–2 day swing)
--------------------------------------------------
• Pivot timeframe: 4H
• Counting timeframe: 15m (or 5m for more signals)
• Levels to scan: 1 to 2
• Structure pivots count (N): 2 to 3
• Min bars breakout: 2 to 3
• Max bars breakout: 5 to 10
✅ Happy scanning and good trades! 😄
📌 SFP SCANNER — QUICK GUIDE (EN)
==============================
🎯 Goal
Automatically scan Swing Failure Patterns (SFPs) on pivot-based support and resistance levels, using a multi-timeframe, structural and filterable approach.
👉 This indicator is designed to be mainly used with alerts on watchlists.
The more permissive the filters are, the more signals (and noise) you will get.
--------------------------------------------------
🧱 1) Pivot Levels — Pivot Timeframe
--------------------------------------------------
Levels are built using classic pivots.
Settings:
• Pivot timeframe: timeframe used to compute pivots (e.g. 4H)
• Pivot source:
- Wicks = highs / lows
- Closes = closing prices
• Left / Right: number of bars required to validate a pivot
➡️ A pivot is confirmed only after “Right” bars.
👉 Recommendation: minimum 15 / 15 on H4.
--------------------------------------------------
🎨 Level Display
--------------------------------------------------
• Pivot High → resistances
• Pivot Low → supports
• Colors, width and style are visual-only settings
--------------------------------------------------
📍 2) SFP Detection — Counting Timeframe
--------------------------------------------------
SFPs are detected on the “Counting timeframe”, regardless of the chart timeframe.
Bearish SFP (resistance):
1) Close above the level (breakout)
2) Close back below the level (reclaim)
3) Breakout duration must respect:
- Min bars breakout
- Max bars breakout
(counted in counting timeframe bars)
Bullish SFP (support):
Mirrored logic:
1) Break below
2) Reclaim above
3) Min / Max bars respected
--------------------------------------------------
🧠 3) Trend Filter — Moving Averages (optional)
--------------------------------------------------
If enabled:
• MA50 > MA200 → only Bullish SFPs allowed
• MA50 < MA200 → only Bearish SFPs allowed
Settings:
• MA timeframe:
- Blank = counting timeframe
- Recommended: pivot timeframe
• MA type: SMA or EMA
• Fast / Slow MA: default 50 / 200
--------------------------------------------------
🧱 4) Structural Support / Resistance Filter
--------------------------------------------------
This filter is independent from the MA filter.
Structure pivots count (N):
• Number of consecutive supports / resistances used to validate structure.
Checkbox logic (restrictive):
👉 If no checkbox is selected → all SFPs are allowed.
Bullish SFPs allowed if:
• Supports are rising
• Resistances are rising
Bearish SFPs allowed if:
• Resistances are falling
• Supports are falling
➡️ Each checkbox acts as an independent restriction.
At least one selected condition must be true to allow the SFP.
--------------------------------------------------
🛑 5) Anti-spam
--------------------------------------------------
• One-shot per level
➡️ Once triggered, the level is considered consumed.
--------------------------------------------------
🔎 6) Levels to Scan
--------------------------------------------------
• Number of recent pivot levels (supports + resistances) checked for SFP detection.
--------------------------------------------------
🕒 7) Multi-timeframe Display
--------------------------------------------------
Regardless of the chart timeframe:
• Chart > Counting timeframe:
A lower-timeframe SFP is displayed on the higher-timeframe candle.
• Chart = Counting timeframe:
The SFP appears directly on the candle at close.
• Chart < Counting timeframe:
The signal is displayed at the opening of the next counting timeframe candle.
--------------------------------------------------
🔔 TradingView Alerts
--------------------------------------------------
• Bullish SFP
• Bearish SFP
--------------------------------------------------
⚙️ Suggested Settings (Day trading / 1–2 day swing)
--------------------------------------------------
• Pivot timeframe: 4H
• Counting timeframe: 15m (or 5m for more signals)
• Levels to scan: 1 to 2
• Structure pivots count (N): 2 to 3
• Min bars breakout: 2 to 3
• Max bars breakout: 5 to 10
✅ Happy scanning and good trades! 😄
Notes de version
==============================📌 SFP SCANNER — QUICK GUIDE (EN)
==============================
🎯 Goal
Automatically scan Swing Failure Patterns (SFPs) on pivot-based support and resistance levels, using a multi-timeframe, structural and filterable approach.
👉 This indicator is designed to be mainly used with alerts on watchlists.
The more permissive the filters are, the more signals (and noise) you will get.
--------------------------------------------------
🧱 1) Pivot Levels — Pivot Timeframe
--------------------------------------------------
Levels are built using classic pivots.
Settings:
• Pivot timeframe: timeframe used to compute pivots (e.g. 4H)
• Pivot source:
- Wicks = highs / lows
- Closes = closing prices
• Left / Right: number of bars required to validate a pivot
➡️ A pivot is confirmed only after “Right” bars.
👉 Recommendation: minimum 15 / 15 on H4.
--------------------------------------------------
🎨 Level Display
--------------------------------------------------
• Pivot High → resistances
• Pivot Low → supports
• Colors, width and style are visual-only settings
--------------------------------------------------
📍 2) SFP Detection — Counting Timeframe
--------------------------------------------------
SFPs are detected on the “Counting timeframe”, regardless of the chart timeframe.
Bearish SFP (resistance):
1) Close above the level (breakout)
2) Close back below the level (reclaim)
3) Breakout duration must respect:
- Min bars breakout
- Max bars breakout
(counted in counting timeframe bars)
Bullish SFP (support):
Mirrored logic:
1) Break below
2) Reclaim above
3) Min / Max bars respected
--------------------------------------------------
🧠 3) Trend Filter — Moving Averages (optional)
--------------------------------------------------
If enabled:
• MA50 > MA200 → only Bullish SFPs allowed
• MA50 < MA200 → only Bearish SFPs allowed
Settings:
• MA timeframe:
- Blank = counting timeframe
- Recommended: pivot timeframe
• MA type: SMA or EMA
• Fast / Slow MA: default 50 / 200
--------------------------------------------------
🧱 4) Structural Support / Resistance Filter
--------------------------------------------------
This filter is independent from the MA filter.
Structure pivots count (N):
• Number of consecutive supports / resistances used to validate structure.
Checkbox logic (restrictive):
👉 If no checkbox is selected → all SFPs are allowed.
Bullish SFPs allowed if:
• Supports are rising
• Resistances are rising
Bearish SFPs allowed if:
• Resistances are falling
• Supports are falling
➡️ Each checkbox acts as an independent restriction.
At least one selected condition must be true to allow the SFP.
--------------------------------------------------
🛑 5) Anti-spam
--------------------------------------------------
• One-shot per level
➡️ Once triggered, the level is considered consumed.
--------------------------------------------------
🔎 6) Levels to Scan
--------------------------------------------------
• Number of recent pivot levels (supports + resistances) checked for SFP detection.
--------------------------------------------------
🕒 7) Multi-timeframe Display
--------------------------------------------------
Regardless of the chart timeframe:
• Chart > Counting timeframe:
A lower-timeframe SFP is displayed on the higher-timeframe candle.
• Chart = Counting timeframe:
The SFP appears directly on the candle at close.
• Chart < Counting timeframe:
The signal is displayed at the opening of the next counting timeframe candle.
--------------------------------------------------
🔔 TradingView Alerts
--------------------------------------------------
• Bullish SFP
• Bearish SFP
--------------------------------------------------
⚙️ Suggested Settings (Day trading / 1–2 day swing)
--------------------------------------------------
• Pivot timeframe: 4H
• Counting timeframe: 15m (or 5m for more signals)
• Levels to scan: 1 to 2
• Structure pivots count (N): 2 to 3
• Min bars breakout: 2 to 3
• Max bars breakout: 5 to 10
✅ Happy scanning and good trades! 😄
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.