# Swing Failure Pattern (SFP)

Swing Failure Pattern (SFP) is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Detects and labels swing failure patterns: wicks that pierce a swing high or low but close back inside, the footprint of engineered stop runs before reversals. A confirmation level validates each turn, and an intrabar volume filter keeps only SFPs where the right share of volume traded beyond the swing. Built for liquidity-minded reversal traders.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 18, 2024.
- Access: free.
- Concepts: [Swing Failure Pattern](https://www.luxalgo.com/library/concept/swing-failure-pattern/) (primary), [Liquidity Sweep](https://www.luxalgo.com/library/concept/liquidity-sweep/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn6dnu0090vhsgofzubuyp
- Page: https://www.luxalgo.com/library/indicator/swing-failure-pattern-sfp/

The **Swing Failure Pattern (SFP)** indicator automatically highlights the [swing failure pattern](https://www.luxalgo.com/library/concept/swing-failure-pattern/): a candle whose wick trades beyond a recent swing high or low yet closes back inside it, a move often engineered by larger participants generating liquidity before a turn. Each detection gets a label and an accentuated wick line, a confirmation level for validating the reversal, and an optional filter measuring the share of candle volume traded beyond the swing from lower-timeframe intrabar data.

## How to Trade the Swing Failure Pattern (SFP)?

- **Bearish SFP**: a wick above a prior swing high with a close back below it; watch for rotation lower.
- **Bullish SFP**: a wick below a prior swing low with a close back above it; watch for rotation higher.
- **Confirmation level**: the highest point between the previous swing and a bullish SFP (the lowest for a bearish SFP). A close beyond it prints a triangle icon confirming the reversal.
- **Volume Threshold %**: keep SFPs where volume beyond the swing stays under the threshold, limiting excessive liquidity generation, or flip the condition to demand a significant sweep.

Contrarian traders can enter on the SFP itself and use the confirmation level to frame profit targets or stop losses; more patient entries wait for the confirming close.

## Swing Failure Pattern (SFP) Settings

- **Swings**: the swing detection period. Longer settings anchor SFPs to longer-term levels and reduce detection frequency without changing the patterns themselves.
- **Bullish SFP** / **Bearish SFP**: show or hide each direction.
- **Volume validation**: choose 'Volume outside swing < Threshold', '> Threshold', or 'None', then set the **Volume Threshold %**.
- **Auto + multiple** / **LTF**: control the lower timeframe used for intrabar volume; Auto picks the nearest suitable one, and a dashboard can display which is applied.

## Frequently Asked Questions

### What does the confirmation level add to an SFP?

It separates the sweep from the turn. The SFP shows liquidity was taken, while the confirmation close shows the market accepted the reversal, so conservative entries wait for the triangle and aggressive ones treat the level as a target or invalidation reference.

### Which tools pair well with SFP detection?

SFPs mark the moment liquidity is taken; a map of where it rests completes the picture. Many traders run this alongside [Buyside & Sellside Liquidity](https://www.luxalgo.com/library/indicator/buyside-sellside-liquidity/) so sweeps can be anticipated at marked pools rather than discovered afterward.

### How do I get the Swing Failure Pattern (SFP) indicator?

It is available free in the LuxAlgo Library. From this page you can also load it into Quant, our coding agent, to run and backtest it. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [HTF Sweep Signals](https://www.luxalgo.com/library/indicator/htf-sweep-signals/) (Swing Failure Pattern): markdown at https://www.luxalgo.com/library/indicator/htf-sweep-signals.md
- [Liquidity Sweeps](https://www.luxalgo.com/library/indicator/liquidity-sweeps/) (Liquidity Sweep): markdown at https://www.luxalgo.com/library/indicator/liquidity-sweeps.md
- [FVG + Liquidity Sweep + CISD](https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd/) (Liquidity Sweep): markdown at https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd.md
- [Smart Money Concepts (SMC)](https://www.luxalgo.com/library/indicator/smart-money-concepts-smc/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/smart-money-concepts-smc.md
- [Structure & Trend Dashboard](https://www.luxalgo.com/library/indicator/structure-trend-dashboard/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/structure-trend-dashboard.md
- [MSS Sweep Fib Retrace](https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace.md
- [HTF CISD Projections](https://www.luxalgo.com/library/indicator/htf-cisd-projections/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/htf-cisd-projections.md
- [Liquidity Structure & Order Flow](https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow.md

---

Source: https://www.luxalgo.com/library/indicator/swing-failure-pattern-sfp/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
