LuxAlgo

Swing Failure Pattern (SFP) [LuxAlgo]

The Swing Failure Pattern indicator highlights Swing Failure Patterns (SFP) on the user chart, a pattern occurring during liquidity generation from significant market participants.

A Confirmation level used to confirm a trend reversal is also included. Users can additionally filter out SFP based on a set Volume % Threshold.

🔶 USAGE


Swing failure patterns occur when candle wicks exceed (above/below) a recent swing level but close back below/above it, and occur from more significant market participants engineering liquidity. This pattern can be indicative of a potential trend reversal.


A label and an accentuated wick line highlight the SFP (both can be disabled).


Using a higher "Swings" period will not return different SFP but will however potentially reduce their detection rate.

🔹 Confirmation Level

The confirmation level is the highest point between the previous swing and SFP for a bullish SFP, and the lowest point for a bearish SFP. This level allows confirming a trend reversal after an SFP once the price breaks it.


A small triangle will be displayed when the price closes beyond the confirmation level.


A more reactive and contrarian approach could use the SFP as an entry point, and the confirmation level for taking (partial) profit, or stop loss. The example below shows a possible scenario:


🔹 Volume % Threshold

During the occurrence of an SFP, the Volume % Threshold option allows comparing the cumulative volume outside the Swing level to the total volume of the candle. The following options are included:

  • Volume outside swing < Threshold: Volume outside the Swing level needs to be lower than x % of total candle volume. Prevent excessive liquidity generation.
  • Volume outside swing > Threshold: Volume outside the Swing level needs to be higher than x % of total candle volume. Requires more significant liquidity to be generated.
  • None: No extra filter is applied


Note that in the above case, the left SFP is no longer highlighted because the volume above the swing level was higher than the 25% threshold of the total volume.

When we change the setting to "Volume outside swing > Threshold", we get the reversed situation.


The "Volume outside Swing level" is obtained using intrabar - Lower TimeFrame (LTF) data.

At the intrabar (LTF) level, there are a maximum of 100K bars available. When using the Volume % Threshold filter, a vertical line will highlight the maximum period during which intrabars are available.


🔶 DETAILS

🔹 LTF Settings

When 'Auto' is enabled (Settings, LTF), the LTF will be the nearest possible x times smaller TF than the current TF. When 'Premium' is disabled, the minimum TF will always be 1 minute to ensure TradingView plans lower than Premium don't get an error.

Examples with current Daily TF (when Premium is enabled):
  • 500 : 3-minute LTF
  • 1500 (default): 1-minute LTF
  • 5000: 30 seconds LTF (1 minute if Premium is disabled)

The concerning LTF can be seen at the right-top (default) corner.

🔶 SETTINGS

  • Swings: Period used for the swing detection, with higher values returning longer-term Swing Levels.
  • Bullish SFP: enable/disable bullish Swing Failure Patterns.
  • Bearish SFP: enable/disable bearish Swing Failure Patterns.

🔹 Volume Validation

Validation:
  • Volume outside swing < Threshold: The volume outside the swing level needs to be lower than x % of the total volume.
  • Volume outside swing > Threshold: The volume outside the swing level needs to be higher than x % of the total volume.
  • None: No extra validation is applied.

Volume % Threshold: % of total volume as threshold.

  • Auto + multiple: Adjusts the initial set LTF
  • LTF: LTF setting
  • Premium: Enable when your TradingView plan is Premium or higher

🔹 Dashboard

  • Show Dashboard: Display applied Lower Timeframe (LTF)
  • Location: Location of the dashboard
  • Size: Size of the dashboard

🔹 Style

  • Swing Lines
  • Confirmation Lines
  • Swing Failure Wick
  • Swing Failure Label
  • Lines / Labels: Color for lines and labels
  • SFP Wicks: Color for SFP wick line

Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?