TradingView
LuxAlgo
Apr 18, 2024 2:10 PM

Swing Failure Pattern (SFP) [LuxAlgo] 

Bitcoin / United States DollarCoinbase

描述

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
评论
Thalassophile
Would gladly pay for a version of this indicator with Alerts. This is a first of it's kind and a long time coming, OUTSTANDING and THANKS!
Ether2020
You are a master, my friend! Amazing scripts, creative, new and superb! Thank you so much for your hard work and sharing it!
crashfrash
it repraint it self
PabloEmmerich
First of all, thank you,
I see the 'validation option' below threshold gives good entry points for reversals too. Sadly there is no strategy to backtest it, so given your backtesting/experience what do you like the most.
BurritoProfits
Please add alerts to this script, it is all that it is missing. Much love.
biliyad4
repaint
skirmantas
repaints
cooney_s
Another gem. Thanks for sharing!
adfghggffdd245776544
does it repaints
Dealer369
Thank you!!!
更多