Sweep [pandich]

Sweep [pandich] marks liquidity-sweep reversals and plans the trade around them: entry at the close of the signal bar, stop behind the sweep wick, and targets at fixed multiples of the risk. A small panel keeps score of how the signals would have played out, in R and after costs, so you can judge the idea on numbers instead of impressions.
How the signal works
Price takes out the lowest low (or highest high) of the previous N bars (default 20) with a wick.
The bar closes back inside that range, in the colour of the reversal (bullish for longs, bearish for shorts), and the close sits in the far half of the bar.
Optional volume filter: bar volume must exceed its 20-bar average (tick volume on CFD/FX; set the multiplier to 0 to switch it off).
Signals are generated on confirmed bars only. Nothing repaints.
Trade plan
Entry: close of the signal bar.
Stop: behind the sweep wick plus a buffer of 0.2 ATR. If that stop is closer than 0.5 ATR it is pushed out to 0.5 ATR; if it is wider than 3 ATR the signal is skipped (shown as "skipped" in the panel).
Targets: 1R, 2R and 3R from the stop distance. A trade ends at the stop, at TP3, or after 60 bars.
One trade at a time. If a bar touches both the stop and a target, the stop is counted (conservative).
The panel
trades, share that reached TP1, share that reached TP3, share stopped.
E TP1 (net): average R per trade if you closed the whole position at TP1.
E tp3 (net): average R per trade if you held the whole position to TP3 (stop, TP3 or the bar-60 exit).
Both are after the cost you enter (spread plus commission per round trip, price units; 0.30 is a typical XAUUSD default).
Numbers turn grey below 30 trades: that is noise, not information.
How to use
Add the script to a standard candlestick chart (XAUUSD M5 is the reference setup; other symbols and timeframes work, retune the cost input).
Wait for a ▲/▼ marker: the zone shows entry, stop and the 1R / 2R / 3R ladder.
Read the panel after a decent sample (30+ trades) before trusting any number in it.
Set the cost input to your own spread plus commission, so E in R is net.
What is original here
The sweep trigger is the only idea borrowed from Setup Scanner [GBB]. The stop model (behind the sweep wick with an ATR buffer and a min/max stop filter), the single-trade engine with conservative same-bar handling, the net-of-cost expectancy scoreboard in R (E TP1 and E tp3), and the alerts are new. The original scanner has six setups and a fixed 1.2 ATR stop; this tool has one setup and a risk model tied to the wick.
Settings worth knowing
Sweep lookback (20), volume multiplier (1.0), ATR length (14).
Stop buffer behind wick (0.2 ATR), min stop (0.5 ATR), max stop (3.0 ATR, 0 = off).
TP1 / TP2 / TP3 in R (1 / 2 / 3), give-up bars (60), re-entry cooldown (1), cost per trade.
Display: zones, panel position, number of drawings kept, colours.
Alerts
"Sweep long" and "Sweep short" alert conditions, plus a message with price and stop when a trade is opened (use "Once per bar close").
Limitations and disclaimer
This is a charting and journaling tool, not a trading system, and not financial advice. No edge is claimed.
"→TP1" with a 1R target is about 50% even for random entries, so it is not a win rate in any meaningful sense. Judge the setup by E in R after costs, on a large sample.
The scoreboard covers only the history TradingView has loaded, and resets when settings change.
No performance claims are made. Test it on your own symbol and timeframe before you rely on it.
Designed for standard candles/bars. No signals are generated on Heikin Ashi, Renko or other non-standard chart types.
Credits
The sweep condition is based on the "Liquidity sweep" setup in Setup Scanner [GBB] by GoodBadBitcoin (open source). This script is a standalone rebuild with a different stop model, risk filter, trade engine, panel and alerts; the rest of the code is new.
How the signal works
Price takes out the lowest low (or highest high) of the previous N bars (default 20) with a wick.
The bar closes back inside that range, in the colour of the reversal (bullish for longs, bearish for shorts), and the close sits in the far half of the bar.
Optional volume filter: bar volume must exceed its 20-bar average (tick volume on CFD/FX; set the multiplier to 0 to switch it off).
Signals are generated on confirmed bars only. Nothing repaints.
Trade plan
Entry: close of the signal bar.
Stop: behind the sweep wick plus a buffer of 0.2 ATR. If that stop is closer than 0.5 ATR it is pushed out to 0.5 ATR; if it is wider than 3 ATR the signal is skipped (shown as "skipped" in the panel).
Targets: 1R, 2R and 3R from the stop distance. A trade ends at the stop, at TP3, or after 60 bars.
One trade at a time. If a bar touches both the stop and a target, the stop is counted (conservative).
The panel
trades, share that reached TP1, share that reached TP3, share stopped.
E TP1 (net): average R per trade if you closed the whole position at TP1.
E tp3 (net): average R per trade if you held the whole position to TP3 (stop, TP3 or the bar-60 exit).
Both are after the cost you enter (spread plus commission per round trip, price units; 0.30 is a typical XAUUSD default).
Numbers turn grey below 30 trades: that is noise, not information.
How to use
Add the script to a standard candlestick chart (XAUUSD M5 is the reference setup; other symbols and timeframes work, retune the cost input).
Wait for a ▲/▼ marker: the zone shows entry, stop and the 1R / 2R / 3R ladder.
Read the panel after a decent sample (30+ trades) before trusting any number in it.
Set the cost input to your own spread plus commission, so E in R is net.
What is original here
The sweep trigger is the only idea borrowed from Setup Scanner [GBB]. The stop model (behind the sweep wick with an ATR buffer and a min/max stop filter), the single-trade engine with conservative same-bar handling, the net-of-cost expectancy scoreboard in R (E TP1 and E tp3), and the alerts are new. The original scanner has six setups and a fixed 1.2 ATR stop; this tool has one setup and a risk model tied to the wick.
Settings worth knowing
Sweep lookback (20), volume multiplier (1.0), ATR length (14).
Stop buffer behind wick (0.2 ATR), min stop (0.5 ATR), max stop (3.0 ATR, 0 = off).
TP1 / TP2 / TP3 in R (1 / 2 / 3), give-up bars (60), re-entry cooldown (1), cost per trade.
Display: zones, panel position, number of drawings kept, colours.
Alerts
"Sweep long" and "Sweep short" alert conditions, plus a message with price and stop when a trade is opened (use "Once per bar close").
Limitations and disclaimer
This is a charting and journaling tool, not a trading system, and not financial advice. No edge is claimed.
"→TP1" with a 1R target is about 50% even for random entries, so it is not a win rate in any meaningful sense. Judge the setup by E in R after costs, on a large sample.
The scoreboard covers only the history TradingView has loaded, and resets when settings change.
No performance claims are made. Test it on your own symbol and timeframe before you rely on it.
Designed for standard candles/bars. No signals are generated on Heikin Ashi, Renko or other non-standard chart types.
Credits
The sweep condition is based on the "Liquidity sweep" setup in Setup Scanner [GBB] by GoodBadBitcoin (open source). This script is a standalone rebuild with a different stop model, risk filter, trade engine, panel and alerts; the rest of the code is new.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.