OPEN-SOURCE SCRIPT
Telah dikemas kini

Sweep-Reclaim Dashboard-Entry-Alert

605
Sweep-Reclaim Dashboard tracks four key intraday levels — prior-day high (PDH),
prior-day low (PDL), overnight high (ONH), and overnight low (ONL) — and flags
only the specific failed-breakout pattern this script is built around: price
sweeps through one of these levels and then reclaims it (closes back on the
original side) within a limited number of bars, without accepting beyond it.

WHAT IT DOES

Pre-market: builds PDH/PDL from the regular session and ONH/ONL from the
overnight session, checks whether any two levels sit too close together to be
treated as separate zones ("clustered"), and estimates a stop distance from the
previous day's ATR.

Live: watches each active level for a sweep, then runs every reclaim through
five hard rules before calling it valid:
1. Closes beyond the level did not exceed the configured maximum (more than
that is acceptance, not a sweep, and the setup is dead).
2. Price reclaimed the level within the configured max bar count.
3. Sweep depth fell between a configurable minimum (filters out noise/brushes)
and maximum (filters out sweeps that are actually breakouts).
4. The reclaim bar's close sits deep enough into its own range (a
configurable top/bottom fraction) to show real rejection, not a weak wick.
5. Candle color matches the trade direction, if that filter is enabled.

Valid signals also have to fall inside one of two configurable trading windows
and clear a minimum reward:risk versus the nearest opposing level (which is
used as the target). Only then does the script plot a signal label with entry,
stop, target, and R-multiple, and optionally fire an alert.

DASHBOARD

Toggle between two dashboard modes:
- Inputs only: shows the raw levels, previous-day ATR, the ATR-based stop
estimate, current price, and whether price is inside the overnight range —
deliberately does NOT compute direction or R:R for you, if you want to keep
doing that step by hand.
- Full table: computes direction, target, distance, expected R:R, and a
watch/skip verdict for every active level in real time, plus a running list
of any level currently mid-sweep.

A "Study mode" hides close-counts and rule verdicts so you can practice reading
the setups yourself before letting the script confirm them. A "Debug row" shows
the script's raw internal session/level state, useful for verifying it agrees
with any separate PDH/PDL/ONH/ONL reference indicator on your chart.

VISUAL RISK BOXES

Every valid signal draws an entry line, a stop-loss line, and one or two
target lines (T1 at 2R, T2 at the nearest non-swept opposing level), plus
shaded green/red zones showing the profit and loss areas at a glance. Lines
and zones auto-extend to the right while the trade is still open, and each
line/label turns green with a checkmark when its target is hit, or red with
an X when the stop is hit — so you can see how a signal actually played out
without leaving the chart. Only the most recent signal's box is shown at a
time. Box length, colors, and fills are all configurable.

ALERTS

One configurable pre-market "plan" alert per day listing each active level,
direction, target, and estimated R from the ATR-based stop estimate — and one
alert per valid live signal, if enabled.

NOTES

- The live target/R:R math for a signal excludes any opposing level that has
already been swept during the session; the once-daily plan alert message
does not apply that exclusion, so the two can point at different levels
mid-session — check the live dashboard/signal for the level actually being
traded.
- Originally built and tuned against QQQ on a 5-minute chart. Threshold inputs
(cluster tolerance, sweep depth, stop multiplier) are percentage-of-price
based so they scale across instruments, but re-validate the defaults before
relying on this for other symbols or timeframes.
- This is a decision-support indicator, not an auto-trading strategy: it does
not place orders and carries no backtest/win-rate claims. All signals require
the trader's own risk management and judgment.
- The four session inputs (time zone, RTH session, overnight session, session
days) must match any separate PDH/PDL/ONH/ONL indicator on your chart
exactly, or the two will disagree.

This script is provided for educational and informational purposes. It is not
financial advice, and past patterns matching these rules do not guarantee
future results.
Nota Keluaran
Bug fix — target selection (important). Targets previously excluded levels already swept that session, which made the target jump to the next level out and badly inflated R:R. In one live case a 0.17R setup was reported as 2.61R and passed the minimum-R:R filter. Targets now use the nearest opposing level regardless of whether it has been swept.

Bug fix — reclaim detection. A candle closing exactly on the level was treated as a reclaim. It now counts as still-beyond, since landing on the line reclaims nothing.

New — calculation trace panel (off by default). Shows every number behind the verdict: pre-market levels, sweep extreme and depth, close count, reclaim OHLC, all six rule checks with pass/fail, the geometry, and live trade status.

Fix — trade status no longer displays a stale open/stopped state when the latest verdict is a skip.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.