🌊 What Is a Liquidity Sweep?
A liquidity sweep occurs when price briefly pushes beyond a well-established level—like a recent swing high or low—to trigger stop-loss orders and “grab” resting liquidity. Immediately afterward, smart-money participants reverse the move:
- Trigger Stops: Retail stop-losses and breakout orders sit just beyond obvious highs/lows.
- Sweep Action: Price spikes past that level, hunting liquidity.
- Swift Reversal: The bar closes back inside the range, leaving a pronounced wick and trapping those who chased the breakout.
🔍 Step-By-Step Indicator Logic
1️⃣ Swing-Level Detection
- Lookback Window: Scans the past N bars (you choose) to find the recent highest high and lowest low.
- Sweep Flag: Marks any intrabar move that exceeds those swing levels as a potential liquidity sweep.
2️⃣ Wick-Size & Body Filters
- Wick Percentage: Measures the extent of the reversal wick beyond the swing line as a percentage of the bar’s total range.
- Body Constraint: Ensures the candle’s body remains small (e.g. <30% of range), characteristic of a false breakout bar.
🔧 Why it matters: A long wick + small body indicates strong rejection immediately after the sweep.
3️⃣ Volume & Trend Confirmation (Optional)
- Volume Spike: Requires bar volume to exceed the 20-bar average, filtering out low-volume noise.
- Trend Alignment:
- Bull Traps: Only in downtrends (EMA50 < EMA200 & price < EMA50).
- Bear Traps: Only in uptrends (EMA50 > EMA200 & price > EMA50).
🎯 Why it matters: Confirms that sweeps happen in the context of the broader market bias and genuine participation.
4️⃣ Session Awareness