Liquidity Sweep + Delta Absorption [PineGen AI] — Strategy by PinegenAI

By PinegenAI

Performance Metrics

Description

OverviewThis strategy looks for one specific institutional footprint: a liquidity sweep of a confirmed swing high or low that gets absorbed rather than continuing. Price wicks through a recent swing point, but instead of running with the breakout, the same bar shows elevated volume and a volume-delta signature that leans against the sweep — a sign the aggressive orders that took out the level got absorbed by resting liquidity on the other side.How It Works1. Liquidity levels — the script tracks the most recently confirmed swing high and swing low (ta.pivothigh/ta.pivotlow), not session or daily levels, so setups can occur on any market and any session.2. Sweep — a bar's wick pierces one of those levels and its close comes back inside it.3. Absorption confirmation — the sweep bar must also show volume above its own average, a close back toward the opposite end of its range, and a volume-delta proxy that leans against the sweep direction. The delta is built from lower-timeframe up/down volume, since Pine Script has no access to real exchange bid/ask tape on standard data feeds — that's disclosed here, not glossed over.4. Optional one-bar confirmation candle, optional EMA trend filter, and an adjustable session window (defaults to the 09:30–12:00 ET US session).5. Risk: ATR-buffered stop beyond the sweep wick, a configurable reward:risk target, and a daily trade cap to prevent overtrading.Key Features- Non-repainting: signals only evaluate on a confirmed bar; swing levels only update once a pivot is fully confirmed.- Long and short, independently toggleable.- Adjustable liquidity-level lookback, volume filter, delta filter, trend filter, session window, and risk settings.- Built-in alerts for both bullish and bearish setups.Backtest Disclosure (as shown)Tested on BTCUSDT, 2h chart, Jan 1 2022 – Sep 19 2026, default settings, $10,000 initial capital, 10% of equity per trade, 0.02% commission, 2-tick slippage:- Net profit: +$568.41 (+5.68%)- Max drawdown: $211.64 (2.02%)- Win rate: 47.83% (11/23 trades)- Profit factor: 2.23Important Notes- This is a backtesting and research tool. Past performance does not guarantee future results.- The default session window (09:30–12:00 ET) is tuned for US index/futures and FX/gold day trading — adjust or disable it for other markets.- The "Order Flow Lower Timeframe" input must be smaller than your chart's timeframe (e.g. "1" on a 5–15 min chart), or TradingView will throw a lower-timeframe error.How to UseAdd the strategy to your chart, open the Strategy Tester tab to review the full report, then use the Settings panel to tune the swing lookback, volume/delta thresholds, session window, and risk inputs to your market.DisclaimerThis script is for educational and informational purposes only and is not financial advice. Trading involves substantial risk of loss. Backtested results do not guarantee future performance.**Overview**This strategy looks for one specific institutional footprint: a liquidity sweep of a confirmed swing high or low that gets absorbed rather than continuing. Price wicks through a recent swing point, but instead of running with the breakout, the same bar shows elevated volume and a volume-delta signature that leans against the sweep — a sign the aggressive orders that took out the level got absorbed by resting liquidity on the other side.How It Works1. Liquidity levels — the script tracks the most recently confirmed swing high and swing low (ta.pivothigh/ta.pivotlow), not session or daily levels, so setups can occur on any market and any session.2. Sweep — a bar's wick pierces one of those levels and its close comes back inside it.3. Absorption confirmation — the sweep bar must also show volume above its own average, a close back toward the opposite end of its range, and a volume-delta proxy that leans against the sweep direction. The delta is built from lower-timeframe up/down volume, since Pine Script has no access to real exchange bid/ask tape on standard data feeds — that's disclosed here, not glossed over.4. Optional one-bar confirmation candle, optional EMA trend filter, and an adjustable session window (defaults to the 09:30–12:00 ET US session).5. Risk: ATR-buffered stop beyond the sweep wick, a configurable reward:risk target, and a daily trade cap to prevent overtrading.Key Features- Non-repainting: signals only evaluate on a confirmed bar; swing levels only update once a pivot is fully confirmed.- Long and short, independently toggleable.- Adjustable liquidity-level lookback, volume filter, delta filter, trend filter, session window, and risk settings.- Built-in alerts for both bullish and bearish setups.Backtest Disclosure (as shown)Tested on BTCUSDT, 2h chart, Jan 1 2022 – Sep 19 2026, default settings, $10,000 initial capital, 10% of equity per trade, 0.02% commission, 2-tick slippage:- Net profit: +$568.41 (+5.68%)- Max drawdown: $211.64 (2.02%)- Win rate: 47.83% (11/23 trades)- Profit factor: 2.2323 trades over roughly 4.7 years is a small sample — enough to show the logic behaves as designed, not enough on its own to draw strong conclusions about edge. Test it on your own instrument, timeframe, and date range before sizing it.Important Notes- This is a backtesting and research tool. Past performance does not guarantee future results.- The default session window (09:30–12:00 ET) is tuned for US index/futures and FX/gold day trading — adjust or disable it for other markets.- The "Order Flow Lower Timeframe" input must be smaller than your chart's timeframe (e.g. "1" on a 5–15 min chart), or TradingView will throw a lower-timeframe error.How to UseAdd the strategy to your chart, open the Strategy Tester tab to review the full report, then use the Settings panel to tune the swing lookback, volume/delta thresholds, session window, and risk inputs to your market before using it live or basing alerts on it.DisclaimerThis script is for educational and informational purposes only and is not financial advice. Trading involves substantial risk of loss. Backtested results do not guarantee future performance.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView