OPEN-SOURCE SCRIPT

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

Snapshot

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.

Snapshot

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

Snapshot

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.

Snapshot

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

Snapshot

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:

Snapshot

🔹 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


Snapshot

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.

Snapshot

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.

Snapshot

🔶 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
breakoutsignalluxalgoreversalreversalpatternsfpsignalswingfailurepatternswingstrendTrend Analysis

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?


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.
Auch am:

Haftungsausschluss