Sweep & Trend | Regime-Filtered Liquidity Sweep Strategy

Sweep & Trend trades liquidity sweeps, the moments when price wicks through a recent swing high or low and then closes back inside. It only takes sweeps that agree with the current trend regime, so it buys sweeps of lows in an uptrend and sells sweeps of highs in a downtrend.
It combines two ideas:
How it works
Reading the chart
Teal glowing line and candles: bullish regime
Red glowing line and candles: bearish regime
Bright A/B/C label: a sweep that was traded
Faded A/B/C label: a sweep that was filtered out by the regime or minimum rank
Fading boxes: active pivot levels that sweeps can trigger on
Tips
Warnings
Credits and license
Derived from Smart Money Bull/Bear Trap Detector by BigBeluga (CC BY-NC-SA 4.0) and Dynamic RSI Trend by NJ_Algo (MPL 2.0). Because of the BigBeluga source, this script is shared under CC BY-NC-SA 4.0, so it is non-commercial and share-alike.
It combines two ideas:
- Adaptive RSI regime. A smoothed RSI is compared against two thresholds that widen and narrow with RSI volatility. When RSI crosses above them the regime turns bullish, and when it crosses below them the regime turns bearish. The regime stays in place until the opposite signal fires.
- Liquidity sweep trigger. Every confirmed pivot high and low becomes a level to watch. If price pokes through it and closes back on the original side within the zone’s life, that is a sweep. Each sweep is ranked A, B or C from its age and volume.
How it works
- A pivot is confirmed after the number of bars set in Pivot strength, and a fading gradient zone is drawn.
- If price wicks through that level and closes back inside before the zone expires, a sweep is recorded.
- The sweep is ranked by two scores. Fresher levels score higher, and volume above the 20-bar average (or above your multiplier) scores higher. Combined, they give A, B or C.
- The sweep is traded only if it matches the regime and meets your minimum rank.
- Optionally, the strategy also enters when the regime flips, so it still trades in quiet markets.
- Each trade gets a stop beyond the sweep wick (or the recent 10-bar extreme for flip entries) plus an ATR buffer, capped at your maximum stop distance. The target is set at your reward-to-risk ratio.
- Trades close at the stop or target, or when the regime flips against them.
- Features
- Regime-filtered sweep entries with A/B/C ranking
- Optional regime-flip entries for more trade frequency
- Longs and shorts can be toggled independently
- ATR-based stops with a buffer and a hard cap
- Fixed reward-to-risk targets
- Regime-flip exit
- Single-pane visuals: a glowing trend line with a gradient fading toward price, fading pivot zones, ranked sweep labels, regime-coloured candles, and stop and target lines
- Dashboard with regime, trade count, win rate, net profit, and the last five sweeps (a ✓ marks the ones that were traded)
Reading the chart
Teal glowing line and candles: bullish regime
Red glowing line and candles: bearish regime
Bright A/B/C label: a sweep that was traded
Faded A/B/C label: a sweep that was filtered out by the regime or minimum rank
Fading boxes: active pivot levels that sweeps can trigger on
Tips
- If it trades too rarely, lower Pivot strength, set Minimum rank to C, and leave Also enter when regime flips on.
- For fewer, cleaner trades, set the minimum rank to B and turn the flip entry off.
- A wider Trend line length gives a calmer ribbon. Lowering Gradient reach tightens the glow.
- Trending markets and liquid instruments suit it best.
- Test several timeframes. The defaults are a starting point, not an optimized setting.
- Set realistic commission and slippage in the strategy properties. The defaults are 0.05% commission and 2 ticks of slippage.
- Use the tooltips on the sweep labels to see each sweep’s age, score and whether it was traded.
Warnings
- Not tested or optimized. The defaults have not been backtested for any market. Run your own tests and don’t assume the defaults will be profitable.
- Not financial advice. Past results do not predict future ones. Only risk what you can afford to lose.
- Late pivot confirmation. Pivots are confirmed several bars after they form, so zones appear after the fact. This is normal for pivot-based tools.
- Signals evaluate on closed bars. Entries fill on the next bar, so live fills can differ from the chart’s markers.
- Volume dependent. Rank scoring uses volume, so instruments with no volume data will mostly rank lower.
- Backtest results depend on your settings. Position size, commission and slippage change the numbers, and intrabar stop and target fills are only estimated.
- Choppy markets can whipsaw it. Sideways ranges are a weak spot for any regime-based system.
- Overfitting risk. Tuning the inputs to look good on past data often fails on new data.
Credits and license
Derived from Smart Money Bull/Bear Trap Detector by BigBeluga (CC BY-NC-SA 4.0) and Dynamic RSI Trend by NJ_Algo (MPL 2.0). Because of the BigBeluga source, this script is shared under CC BY-NC-SA 4.0, so it is non-commercial and share-alike.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。