Opening Range Breakout & Liquidity EngineOpening Range Breakout & Liquidity Engine
Overview
A complete intraday opening-range-breakout engine. For each session it auto-detects the open, builds the opening range (the high–low band of the first N minutes, where the day's initial balance is set), and then does the three things most opening-range scripts leave out: it filters the day for tradability, it projects a trade map (targets and a stop) scaled to that day's own volatility, and it keeps an honest, on-chart win-rate tally of how often breaks actually reach their first target before the stop. It draws the structure and the map; it does not place orders. Analytical tool, not advice.
What makes it different — why these pieces are ONE engine (mashup rationale)
The opening range is the substrate — the reference band the whole day is measured against (ORH / ORL / midpoint).
The relative-volume ("in play") filter asks whether the range formed on above-average volume — the single biggest edge driver in the research. A break on a quiet day and a break on an active day are not the same event, so the engine measures the range's volume against a rolling average of prior sessions' opening-range volume and flags it.
The direction filter can require the break to agree with the opening-range candle's own direction, dropping the counter-range breaks that fare worst.
The accepted-break logic (close beyond the edge, optionally held a bar) separates a real initiative move from a wick.
The trade map projects targets (as range multiples or risk/R multiples) and a stop (opposite edge, range midpoint, or an ATR distance), so the plan scales to each day's volatility instead of fixed points — and reports the resulting R:R.
The win-rate harness closes the loop: it tracks every break until it tags target 1 or the stop and reports a real, path-aware Hit % and Edge on your instrument (optionally in-play only), logging unresolved breaks as end-of-day exits separately.
The failed-break module handles the other half of reality: a break that closes back inside the range traps breakout traders, so the engine flags it, projects the reversal to the opposite edge (stop at the failure extreme), and runs a second harness measuring how often that fade reaches the opposite edge before the failure is re-broken. A retest-hold flag marks the high-probability continuation entry; a trap flag marks both-edges-broken days; a range-state read (compressed / normal / wide) says what kind of break you're looking at.
Split apart, each piece is a fragment: a box without the filters is noise, targets without the harness are guesses, and a break with no failure case is half the picture. Chained, they answer one question — is this opening-range break worth taking here, and if it fails, is the fade? That interdependence is why it's a single engine, not a bundle.
What this adds over a standard opening-range script
Most ORB scripts stop at drawing the box and the two breakout lines. This engine adds the parts that decide and verify:
Relative-volume "in play" filter. Flags whether today's opening range formed on above-average volume — research-shown to be the dominant driver of opening-range edge — with an optional toggle to count only in-play days in the stats.
Range-direction filter. Optionally restricts breaks to the direction the opening-range candle closed, removing the weakest counter-range trades.
Volatility-scaled trade map. Targets as range or R (risk) multiples; stop at the opposite edge, the range midpoint, or an ATR distance — with the live R:R shown.
Path-aware win-rate harness. Tracks each break to target 1 or stop and reports an honest Hit % / Edge (vs a 50% coin-flip), counting end-of-day exits separately — a real, in-sample reality check, not a curve-fit claim.
Failed-break reversal module. Detects the break that closes back inside the range (a fakeout — research puts breakout failure rates in the 60–80% range), projects the fade toward the opposite edge with the failure extreme as its stop, and runs a second harness reporting how often the fade reaches that edge first. A failed break is often the better trade, and almost no ORB script measures it.
Retest-hold, trap and range-state context. A retest-hold flag marks the broken edge holding as support/resistance (the higher-probability continuation entry); a trap flag marks both-edges-broken whipsaw days; a range-state read (compressed / normal / wide vs the rolling average) says whether the break is likely to run or fail.
Reference levels with built-in legends. Current-day H/L, prior-day H/L (PDH/PDL) and prior-week H/L (PWH/PWL) — the most-watched intraday liquidity pools — are drawn as labelled lines that extend right, each tagged (DH/DL/PDH/PDL/PWH/PWL) so every line identifies itself. A Day position read shows whether price is above PDH, inside the prior-day range, or below PDL.
Liquidity-sweep detection, fused with the failure logic. A sweep — price wicks beyond PDH/PDL/PWH/PWL and closes back inside, taking the stops there — is flagged with a marker and in the dashboard. Because the opening-range edges are themselves prime liquidity, a failed ORB break that sweeps a level is the highest-conviction version of the fade; the engine ties the two together.
Institution-grade, readable visuals. Events are compact bar-anchored markers (triangle / cross / circle / flag) instead of stacked labels; key levels are drawn as glowing lines with bold colour-coded legend chips at the right edge; a legend-key panel decodes every mark and line; and only the most recent sessions' drawings are kept, so the chart stays clean even after months of history. The dashboard and legend key are theme-adaptive — they auto-match a light or dark chart background for proper contrast.
Auto-session that works where others break. New-session detection keys off a calendar-day change in the instrument's own timezone, so it resets correctly even on feeds with no out-of-session bars (NSE index futures only print 09:15–15:30) — where edge-detection scripts silently fail.
Fused decision dashboard. Break state, ORH/ORL, range, range state, range direction, relative volume / in-play, targets, stop, R:R, day position vs the prior day, liquidity-sweep status, the running Hit % / Edge, the failed-break fade and its Hit % / Edge, and retest/trap status — theme-adaptive to your chart.
How it works
Session: Auto groups by the instrument's trading day in its native timezone (works even with no out-of-session bars); Manual pins a window. Range: the high/low of the first N minutes become ORH/ORL; the midpoint is the pivot; the range candle's close-vs-open sets the range direction; its volume vs a rolling average gives the relative-volume "in play" read; its size vs a rolling average gives the range state (compressed / normal / wide). Break: the first close beyond ORH (long) or ORL (short) after the range completes, optionally held a bar and optionally restricted to the range direction. Map: targets = break edge + range multiples, or entry + risk (R) multiples; stop = opposite edge, range midpoint, or an ATR distance. Harness: each break is followed until it tags target 1 or the stop; unresolved breaks at the close are logged as end-of-day exits, separate from the Hit %. Failure: if an accepted break closes back inside the range it is flagged failed; the reversal targets the opposite edge with the failure extreme as stop, and a separate fade harness reports how often that reversal reaches the opposite edge before the failure extreme is re-broken. A retest of the broken edge that holds is flagged continuation; both edges breaking is flagged a trap. Levels: current-day H/L (tracked live), prior-day H/L and prior-week H/L (from the weekly series) are drawn as labelled lines (DH/DL, PDH/PDL, PWH/PWL) extending right. Liquidity: a sweep is a bar that wicks a set fraction of ATR beyond PDH/PDL/PWH/PWL then closes back inside — the stops there are taken and price rejects — flagged with a marker and in the dashboard alongside the day-position read.
How to use
Trade with an accepted break toward target 1 / 2, invalidated back inside the range (or at the chosen stop); favour in-play, range-direction and compressed-range breaks, and breaks that also clear PDH / PWH (genuine acceptance through liquidity) — all shown to carry the edge. When a break fails back inside, or sweeps a key level and rejects, the fade toward the opposite edge is often the better trade — the dashboard's fade Hit % / Edge tells you whether it has paid here. A retest that holds confirms continuation; a trap (both edges broken) is usually a stand-aside. Use the Hit % / Edge reads as a reality check before relying on any of it. Context for your decisions — not a standalone trigger.
Universal across markets (configurable data source)
High / low / close sources, the session mode / window / timezone and the range length are all inputs, so the engine runs on any instrument and intraday timeframe. Defaults target NSE NIFTY index futures with a first-15-minute range (the research tested 5 / 15 / 30 / 60 minutes; 5 was best on US single stocks). Change the sources, session and range for any other market. Use an intraday chart; the relative-volume filter needs a real volume feed and degrades gracefully without one.
Originality
The opening-range, fakeout-reversal and liquidity concepts are public (credited below); the original work is the assembly and the code — auto-session detection that works on instruments with no out-of-session bars, the relative-volume "in play" / range-direction / range-state filters, the range / R-multiple trade map with ATR stop and end-of-day exit, the path-aware win-rate harness, the failed-break reversal module with its own fade harness, and the reference-level + liquidity-sweep engine that ties the break to prior-day / prior-week liquidity. No third-party code is reused.
Companion drawings (TradingView compliance note)
Everything this plots is part of the one engine and is explained above — the opening-range box, the ORH/ORL/midpoint lines, the day/week reference levels (DH/DL, PDH/PDL, PWH/PWL) with their right-edge legends, the bar-anchored break / failed / retest / sweep markers, the target / stop / reversal lines, the legend-key panel, and the dashboard. There are no unrelated studies. Before publishing, clean the chart so only this indicator is shown.
Concept credit
The opening-range-breakout concept is long-standing market lore, formalised by Toby Crabel ("Day Trading with Short Term Price Patterns and Opening Range Breakout") and related to Mark B. Fisher's ACD method ("The Logical Trader"). The relative-volume "stocks in play" filter and the range-direction entry follow the empirical study of Zarattini, Barbon & Aziz (2023–24). The failed-breakout (fakeout) reversal and retest-hold continuation are classic price-action concepts, and prior-day / prior-week liquidity with the liquidity-sweep (stop-raid-then-reject) read are general price-action / Smart-Money-Concept ideas in wide public use. Implementation is original; not affiliated with, nor endorsed by, any third party, and no third-party code is reused.
Honesty / limitations
The Hit % is path-aware but in-sample, ignores costs and slippage, assumes the target/stop fills exactly at touch, and counts one break per session — descriptive context, not a verified backtest. Opening-range behaviour varies by instrument, session and regime. This engine maps structure; it does not predict which breaks will work.
Disclaimer
Research / educational only. NOT financial advice; no guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability Indicator

Volume Supply and Demand [TradingIQ]The Next Generation of Supply and Demand
You haven't seen a single good Supply and Demand indicator until today.
Let's be honest: almost every S/D indicator you've tried is either too late, constantly repaints, or simply flags every single random pivot on the chart as a "zone." That is not how institutional trading works. Traditional support and resistance might teach you to draw lines at every turning point, but if you've been trading for more than two weeks, you know that not every pivot holds weight in the future.
This tool was built to fix that. It is designed to filter out the low-quality noise, bypass the common structural flaws of basic chart metrics, and isolate nothing but genuine liquidity shock events where massive market orders actually took place.
Welcome to the Volume Supply and Demand engine.
---
How the Algorithm Works (The "Why")
Easier said than done, right? Finding a level that actually has institutional defense behind it requires deep mathematical screening. Instead of just looking for simple highs and lows, this algorithm detects explosive price moves via an advanced multi-step screening system.
First, the script calculates the True Range of consecutive candles to establish a baseline of normal market volatility. Once that baseline is set, it actively scans for sudden, abnormal expansions in price. It analyzes the specific angle, slope, and velocity of the expansion to ensure the move is statistically anomalous.
Demand Zones: These are flagged when extreme buying pressure forces a rapid, high-velocity move upwards, leaving behind a massive footprint of unfilled passive limit orders.
Supply Zones: These are flagged when intense selling aggression ramps up instantly, completely rejecting higher prices and driving the market down with severe negative velocity.
We strictly filter out the low-quality, minor pivot points. Once the strict qualifications of velocity and range expansion are met, the zone is detected and locked in instantly.
---
Structure vs. Normal Support & Resistance
To trade effectively, you must understand why these zones behave differently than standard horizontal support and resistance lines.
Traditional support and resistance lines can theoretically be drawn anywhere the market decides to turn around, regardless of the volume or speed behind the move. This creates messy charts cluttered with hundreds of psychological lines that offer no real edge.
This engine is different because it maps out an entire premium or discount zone based on the exact candle structural properties where the initial institutional imbalance occurred. It targets the literal origin of the reaction , creating a highly precise boundary where a major market participant stepped in aggressively to flip the auction control.
---
Deep-Dive Order Flow Features
We didn't just build a box-drawing tool. We added an entirely new dimension of volume analysis to help you gauge the actual internal strength of these levels.
Origin Volume Profiles: This is the game-changer. For every valid Supply or Demand zone generated, the indicator dynamically projects a micro Volume Profile directly inside the specific structural move that created the zone . You get an immediate, visually clear picture of exactly where the heavy volume was transacted during that specific liquidity event.
Delta & POC Lines: The algorithm identifies the Point of Control (POC) for both the buy-volume side and the sell-volume side independently. By plotting these lines, you can see precisely where the buyers or sellers exhibited their maximum aggression right before the major expansion occurred.
Time-Based Profiles: Volume isn't the only metric that matters. You can change the profile type inside the settings to "Time" to generate a profile that maps out exactly where the price spent the most time consolidating before exploding out of the zone.
Auto Hit-Deletion: The more a level is traded into, the weaker it gets as the resting passive orders are continuously matched and filled. To prevent you from trading dead levels, the indicator includes an automated hit-deletion toggle. The moment the price decisively pierces through a zone, the script recognizes the liquidity exhaustion and wipes the zone from your chart.
---
Settings & Optimization Guidelines
Because this script relies on heavy historical array calculations and complex request structures, proper optimization is essential for a smooth charting experience:
S/D Zone Style (Wick, Body, Candle): This dictates the strictness of your zone boundaries.
Wick (Default & Strongly Recommended): Draws the zone across the precise wick of the origin candle, capturing the maximum premium/discount extremity.
Body / Candle: Alternative constraints that alter the vertical width of the boxes based on the candle open and close values.
Max Zone Age (Bars): A zone created hundreds of bars ago losing its relevance because the participants holding those orders have likely closed their positions. This setting expires old zones to keep your chart fresh. If your chart experiences loading delays, lower this setting to roughly 200 bars.
Calculated Bars: To manage the calculation weight of the Epanechnikov kernel filtering and volume slice matrices, you can adjust the total calculation window. If your chart shows a red runtime error, lower this setting from 5000 down to 2000 bars.
Show Volume at Level: Turning this on overlays the raw numerical transaction data over each individual profile block, allowing for precise order flow calculation.
---
The Core Trading Logic
When a zone is formed by a massive imbalance of aggressive market orders, institutional participants frequently leave resting passive limit orders behind because the market moved too quickly to fill their entire block. When price returns to this exact zone for the first time, those resting orders are triggered. This acts as a defense line, forcing an aggressive, fast reversal.
If price returns to a zone multiple times, or if it begins to grind and spend a long time consolidating inside a box, that is a major warning sign. It means liquidity is actively depleting, the passive orders are being entirely consumed, and a massive liquidity shock breakout is right around the corner.
Disclaimer: This is not financial advice. Always test the mechanics against your own personal edge, backtest thoroughly, and integrate it properly within your broader risk management plan. Indicator

5 Advanced MAs MTF🔵 OVERVIEW
5 Advanced MAs MTF is a professional moving averages indicator designed for traders who need to see multiple trend layers on a single chart simultaneously, each one with its own independent configuration and — above all — its own timeframe.
Unlike typical "ribbon" or "multi-MA" indicators on the market, which display several averages all computed on the active chart's timeframe, this indicator allows each of the 5 averages to have its own timeframe. You can have your EMA 8 on the 15-minute chart, your EMA 20 on the 1-hour, your EMA 50 on the 4-hour, and your SMA 200 on the daily, all plotted on the same 15-minute chart. That turns the indicator into a complete multi-timeframe control panel without needing to open four separate charts or saturate your installed indicators list.
🔶 KEY FEATURES
• 5 fully independent moving averages — each one configured separately and enabled or disabled individually.
• True multi-timeframe per MA — the core differentiator. Each MA can read its value from a higher, lower, or equal timeframe relative to the active chart. Leave it empty to use the chart's current timeframe.
• 9 moving average types — SMA, EMA, WMA, RMA, HMA, VWMA, TEMA, KAMA, and JMA. The last three (TEMA, KAMA, JMA) are implemented with their original formulas, no shortcuts. JMA uses Mark Jurik's standard defaults (Phase = 50, Power = 2).
• Configurable source per MA — Close, Open, High, Low, hl2, hlc3, ohlc4.
• Full visual styling per MA — color, width (1 to 10), and line style (solid, dashed, or dotted).
• Smart labels — each MA can show its label directly on the line, with configurable content (type, length, timeframe, or any combination of the three). Adjustable horizontal bar offset and text size.
• Interactive summary table — placed at any of the 9 chart anchors, displaying color column, type, length, timeframe, and price distance from each MA (in percentage and absolute value). Toggle to include or exclude hidden MAs.
• 22-alert system — 10 for Price↔MA crosses (bullish and bearish for each MA), 10 for MA↔MA crosses across 5 configurable slots (you pick which MA pairs to monitor), and 2 wildcard "any cross detected" alerts. All compatible with webhooks and automation.
• Works on any market and any timeframe — equities, futures, crypto, forex, commodities. From tick charts to monthly charts.
🔹 USE CASES BY TRADER STYLE
▪️ Day trader / scalper
Configure the first 3 MAs as short EMAs (8, 20, 50) on the chart's timeframe (5m or 15m) and leave MAs 4 and 5 as SMA 200 and VWMA 100 but reading them from a higher timeframe (1H, 4H, or daily). Result: you see your fast entry signals and the higher-timeframe bias at the same time without switching charts.
▪️ Swing trader
Recommended setup: EMA 20 and EMA 50 on the active chart (1H or 4H) + SMA 200 read from daily + VWMA 100 read from weekly. This lets you watch pullbacks against the EMA 20 on your operative timeframe with immediate confirmation that the higher-timeframe bias is aligned, plus the weekly VWMA as a volume-weighted "fair price" reference.
▪️ Position trader / long-term
Enable all 5 MAs on daily or weekly to build a complete structural map of the asset. The default configuration (EMA 8, EMA 20, EMA 50, SMA 200, and VWMA 100, all on daily) covers everything from fast momentum to the institutional level, combining pure-price references (SMA 200) with volume-weighted references (VWMA 100). The summary table shows the exact distance of price from each one.
▪️ Systematic crossover trader
The MA↔MA alert slots let you configure up to 5 specific crossovers simultaneously. Classic Golden Cross / Death Cross setup: Slot 1 with MA 3 (EMA 50) crossing MA 4 (SMA 200) on daily, with an automatic alert sent to your bot's webhook or notification system.
▪️ Multi-timeframe confluence trader
The most differentiating use case. Assign each MA to a different timeframe: MA 1 on 5m, MA 2 on 15m, MA 3 on 1H, MA 4 on 4H, MA 5 on daily or weekly. The summary table shows you in real time the distance of current price from the key level of each of those timeframes. When several MAs from different timeframes converge on the same price zone, that zone becomes a high-density structural level — one of the most-used concepts among institutional traders.
⚙️ INPUTS & CUSTOMIZATION
The entire indicator is 100% configurable from the Inputs panel. Each MA has its own expandable group with 14 controls. The summary table is also fully customizable (position, text size, background/border/text colors). The JMA global parameters (Phase and Power) live in their own section so advanced users can adjust them without cluttering the individual groups.
By default, all 5 MAs are enabled with a configuration tailored for daily and swing use: EMA 8 (blue, 1D), EMA 20 (red, 1D), EMA 50 (yellow, 1D), SMA 200 (green dashed, 1D), and VWMA 100 (pink dotted, 1D). The user can modify any of the parameters or reassign the MAs to other timeframes at any moment.
🔔 ALERTS
The indicator ships with 22 precompiled alerts ready to use:
• 5 alerts "Price crosses above MA N"
• 5 alerts "Price crosses below MA N"
• 10 alerts across 5 configurable slots for MA↔MA crossovers (bullish and bearish per slot)
• 2 wildcard alerts "any cross detected"
All messages include the {{ticker}} and {{close}} placeholders so they are directly parseable by webhooks, bots, and automation systems.
❓ FAQ
Does the indicator repaint?
No. The moving averages are computed on confirmed historical data. Cross alerts fire on the bar of the cross and values are not modified retroactively. To avoid signals that appear and disappear intra-bar, set the alerts to "Once per bar close".
Does it work on any timeframe?
Yes. From tick charts to monthly. In addition, each MA can have its own higher, lower, or equal timeframe relative to the active chart. The default timeframe is the current chart's timeframe.
Why 9 MA types?
Because each type behaves differently. SMA is the pure average; EMA weights recent bars more; HMA virtually eliminates lag; KAMA adapts to volatility; JMA is the smoothest while staying responsive; VWMA weights by volume. Having all of them available lets you use the right tool for each analysis without installing several separate indicators.
What are the 5 MA↔MA alert slots for?
They let you configure specific crossovers between any pair of MAs without having to create all possible combinations. In each slot you pick the fast MA and slow MA from dropdowns and receive alerts for the bullish and bearish crossovers of that pair. Example: Slot 1 = MA 3 crosses MA 4 (classic Golden Cross / Death Cross when MA 3 = EMA 50 and MA 4 = SMA 200).
What is the best MA combination?
There is no single "best" — it depends on the trading style and the asset. The Use Cases section above includes recommended configurations for the 5 most common profiles.
Is it compatible with webhooks and automation?
Yes. The 22 alerts use {{ticker}} and {{close}} placeholders in their messages, making them directly compatible with TradingView Webhooks, copy-trading platforms, Telegram/Discord bots, and any system that parses JSON.
Is it free to use?
Yes. Open-source indicator under the Mozilla Public License 2.0. You can review the full code, use it freely on TradingView, and create derivative copies while respecting the license terms.
⚠️ DISCLAIMER
This indicator is a technical analysis tool provided solely for educational and informational purposes. It does not constitute financial advice, an investment recommendation, or an invitation to trade any instrument. Moving averages are reactive (not predictive) indicators: they are based on historical data and, by their nature, can produce delayed signals in markets with sharp trend changes. In ranging or low-volatility market contexts, crossovers can be frequent and not particularly informative. Every trading decision is the sole responsibility of the trader. Past performance does not guarantee future results.
© 2026 Lic. Farias Foresi, Leandro M. — License: Mozilla Public License 2.0
Indicator

Sweep and Cluster [JOAT]SWEEP AND CLUSTER
A two-stage liquidity-sweep engine. Most public "sweep" indicators print a label on every wick that pokes past a recent high or low — which is mostly noise. Sweep and Cluster requires two separate events to register a tradeable signal: first a strict 5-condition sweep, then a confirming cluster of price action in the rejection direction. The label that actually appears on the chart is the rare intersection — the moments where institutional stop-running is followed by genuine commitment in the opposite direction.
Stage 1 — Strict 5-condition sweep detection
A sweep is registered only when all of these are true on the same bar:
Real pivot reference — the swept level is an actual minor pivot (ta.pivothigh / ta.pivotlow) from the rolling cache, not a rolling max/min. A scan-depth input controls how far back to look; a minimum-age gate prevents self-reference.
Wick magnitude — the wick that exceeds the pivot must be at least Wick ATR Multiplier × ATR(14) (default 0.8 ATR). The KB-published strict threshold.
Wick dominance — wick length must be at least Wick/Range Ratio of the candle's total range (default 35%). The wick must dominate the bar's shape, not be a side-effect of a large body.
Closing direction — close must be back inside the swept level. A clean wick that closed beyond the pivot is a breakout, not a sweep — and is filtered out by construction.
Cooldown — at least N bars (default 8) since the last same-side sweep. Prevents one stop-run from being counted as multiple sweeps when the wick prints over several bars.
If all five conditions are met a pending marker is placed (optional). Pending markers represent "a sweep happened" but not yet "the sweep was meaningful" — until the cluster confirms, the sweep is not actionable.
Stage 2 — Cluster confirmation
After a sweep fires, the next N bars (cluster window, default 5) are monitored for confirming follow-through. The cluster confirms only when:
At least M bars (default 1) close against the swept direction inside the window.
Average body/range across the qualifying cluster bars exceeds the Min Body Ratio (default 0.25) — the rejection candles must be impulsive, not micro-bodies.
Cumulative volume across the cluster window is at least Volume Multiplier × Average Volume (default 0.8×). Without volume the cluster is not commitment.
When all three confirm, the script fires the SAC (Sweep And Cluster) label — the actionable signal. A cluster strength badge (body sum / ATR) is rendered next to the label so you can rank one SAC vs another at a glance.
A failed sweep marker (toggleable, off by default) tracks sweeps that expired without confirming — useful for auditing the false-positive rate visually and for choosing thresholds.
Visual system
Sweep wick highlight — a thin coloured line at the swept reference price, extended right by a configurable number of bars. Makes the rejection unmistakable.
Reference level triangle — small glyph at the actual pivot level that was swept.
Cluster candle override — when SAC fires, the confirming cluster candles are repainted in the active-side theme colour via plotcandle so the move stands out from background.
Optional background tint — fading directional bgcolor for a few bars after a confirmed SAC.
Optional bar paint by active bias — every bar painted bull/bear based on the most recent SAC. Off by default to preserve chart neutrality.
A locked Quantum palette (cyan-quantum bull / pink-quantum bear on a deep void) gives the chart a distinctive sweep-and-reverse identity.
Dashboard + rolling statistics
A monospaced table, positionable to any of nine corners, with vertical row-fade for premium feel. Surfaces:
Total sweeps and total SACs since the last session/day/week reset (configurable reset frame).
Rolling Confirmation Rate (% of recent sweeps that became SACs) over a configurable window (default 50). The script's own success metric.
Pending sweep status with bars-remaining-in-cluster-window.
Last SAC direction with strength badge and bars-ago.
Last failed sweep tag (when failed markers are enabled).
Confirmation Rate is the headline read — it lets you see whether the current threshold settings are producing meaningful or sparse signals on the instrument you are trading.
Alerts
Three alert conditions, each independently controllable:
Pending Sweep (Stage 1 fires)
SAC Confirmed (Stage 2 confirms)
SAC Failed (Stage 2 expires without confirming) — off by default
How to read it
Two reads, in order of conviction:
SAC Confirmed alert with a high strength badge — the script's intended signal. Liquidity was swept, a real rejection followed inside the window, and the rejection had body and volume. This is the actionable read.
Pending Sweep at a known structural level (S/R, supply/demand) — useful as a "watch for the cluster" warning. If the cluster confirms, you have a high-conviction reversal at a structural location.
In persistent trends the failed-sweep rate climbs — that is the script telling you the regime does not currently favour sweep-and-reverse setups; stand aside or use the script in the trend direction only.
Suggested settings
Defaults (pivot lookback 8, wick ATR 0.8, body ratio 0.35, cluster window 5) are tuned for 15m–1H on liquid markets. For scalping (1m–5m), drop pivot lookback to 4 and cluster window to 3. For HTF macro reads (4H+), raise pivot lookback to 12–20 and cluster window to 8. The strict-threshold wick filters (0.8 ATR + 35%) are intentionally institutional — loosen for less liquid instruments.
Originality
The implementation — the five-condition strict sweep gate, the rolling minor-pivot cache with age and scan-depth filters, the three-condition cluster confirmation, the cluster-strength badge calculation, the pending → confirmed → failed state machine, the wick-level highlight render, the plotcandle override for confirming bars, the rolling confirmation-rate metric, and the session-reset counter — is JOAT-original. No third-party code reused. The "sweep + reaction" pattern is well-known to professional tape readers; the strict double-gate implementation is built specifically for chart-based Pine data.
Limitations
A confirmed SAC requires the cluster window to elapse — by definition the signal carries the cluster window bars of lag relative to the sweep. This is intentional; the cluster is what makes the signal meaningful. Failed sweeps are expected — the confirmation rate metric is there for you to see and tune accordingly. The script is structure-aware (uses real pivots) but does not know about HTF structure; combine with a higher-timeframe S/R indicator for best fit.
—
—
-made with passion by jackofalltrades
Indicator

Indicator

Indicator

Macro Candle OverlayMacro Candle Overlay is a higher-timeframe candle visualization tool designed to display selected macro candles directly on the active chart.
The script draws candles from a selected higher timeframe, such as 15m, 30m, 1H, 2H, 4H, Daily, Weekly, or Monthly. Each higher-timeframe candle is represented with its own body and wick, allowing traders to view larger candle structure without switching away from the current chart timeframe.
This can help with visual analysis of broader market context, including higher-timeframe candle direction, wick behavior, candle body size, and developing macro candle structure.
Main features:
* Higher-timeframe candle overlay on the current chart;
* Selectable candle timeframe;
* Bullish and bearish body color settings;
* Wick and border color settings;
* Adjustable body transparency;
* Automatic candle updating while the current higher-timeframe candle is still developing;
* Clean chart-based visualization with no signal logic.
How it works:
The indicator uses the selected higher timeframe to define candle open, high, low, close, start time, and end time. It then draws each candle as a chart object, including a candle body and a wick. The active candle updates as new price data appears.
This script does not generate buy or sell signals. It does not include strategy logic, alerts, backtesting, win-rate calculations, or performance projections. It is intended only as a visual charting tool for reading higher-timeframe candle structure.
Traders can use it as an additional visual reference together with their own analysis, market structure, risk management, and trading plan.
Indicator

Candle LevelsCandle Levels is a rebuild of my original Candle Levels Pro framework, designed to map important completed-candle and session reference levels directly on the price chart. This script focuses on current day/session levels, previous close, lower-timeframe completed candle levels, daily candle levels, weekly candle levels, and monthly candle levels. It also includes source-aware line starts and compact right-side labels so users can quickly see the level price, current distance from price, and level tag.
────────────────────────────
Core Idea
────────────────────────────
Markets often react around prior candle highs, lows, closes, session opens, and active-session extremes.
Candle Levels turns those reference points into organized horizontal levels:
• Current High of Day / Low of Day
• Regular-session open
• Premarket open
• Current close reference
• Previous close
• Previous completed LTF candle highs/lows/closes
• Previous completed daily candle highs/lows/closes
• Previous completed weekly candle highs/lows/closes
• Previous completed monthly candle highs/lows/closes
Instead of plotting every possible historical line, the script focuses on the active references that matter most to you now.
────────────────────────────
Asset-Aware Source Logic
────────────────────────────
The script separates stock/fund/ADR behavior from crypto behavior. It is not currently set up for futures. Futures have different session structures, settlement behavior, overnight handling, contract-specific calendars, and reference-level needs. A separate futures-focused version will be handled as its own script so the logic can be built specifically around futures sessions instead of forcing futures into the stock/crypto model.
For US-session stocks, funds, and ADRs:
• Close references use regular-session close data
• High/low references use extended/full-session high-low data when available
• HOD / LOD track the current full-session high and low
• PCL uses the prior regular-session daily close
• OPEN uses the regular-session open
• PMO uses the first premarket open
For crypto:
• Levels use the native 24-hour chart stream
• Daily levels follow the native 24-hour daily cycle
• US-session-only references such as PMO and CC are hidden automatically
This source split is intentional. Many traders want regular-session closes but still want premarket and after-hours highs/lows visible when those extremes matter.
────────────────────────────
Current Session Levels
────────────────────────────
The current-session block tracks:
• HOD
• LOD
• OPEN
• PMO
• CCL
• PCL
HOD and LOD update as the active day makes new extremes. Their lines can begin at the candle that created the current high or low, making the source of the level visually clear.
PCL has its own dedicated input group, label padding, and bull/bear color controls so it can be styled separately from the daily high/low rows.
────────────────────────────
Lower-Timeframe Candle Levels
────────────────────────────
The LTF section includes hardcoded completed-candle references for:
• 10m
• 15m
• 30m
• 1h
• 2h
• 4h
• 8h
Each row can show the previous completed candle’s:
• High
• Low
• Close
The “ ” tag means previous completed candle for that timeframe. For example, 1h means the prior completed one-hour candle, not a rolling last-60-minutes window.
────────────────────────────
Daily Candle Levels
────────────────────────────
The Daily section includes:
• D High / Low
• D High / Low / Close
• D High / Low / Close
D is the most recent completed daily candle. D is the single daily candle two completed sessions back. D is the single daily candle three completed sessions back.
These are candle offsets, not rolling multiday ranges.
For US-session equities, Daily Hi/Lo levels can include premarket or after-hours extremes when full-session history is available. This means a D Hi or D Lo may not always match the visible regular-session-only TradingView daily candle.
Daily Close levels use the regular-session close source for US-session equities.
────────────────────────────
Weekly And Monthly Candle Levels
────────────────────────────
The Weekly section includes:
• W High / Low / Close
• W High / Low / Close
W means the prior completed 1-week candle. W means the single 1-week candle two completed weeks back. W is not a 2-week candle.
The Monthly section includes:
• M High / Low / Close
• M High / Low / Close
• M High / Low / Close
M means the prior completed 1-month candle. M means the single 1-month candle three completed months back. These are not rolling multi-month ranges.
Weekly and Monthly rows have independent high/low label controls, close label controls, and per-row label padding inputs.
────────────────────────────
Line Start Modes
────────────────────────────
Daily, Weekly, and Monthly levels include source-aware line-start controls.
Active Period:
Starts the level from the current active period. This keeps the chart cleaner and avoids long historical spans.
Source Window:
Starts the level from the beginning of the completed source candle window used for that offset.
Source Candle:
Starts high/low lines from the chart candle that created the completed source high or low when that source timing is available. Close lines start from the completed source close candle when available.
If the exact source candle is not available, the script falls back to Source Window when available, then Active Period.
────────────────────────────
Right-Side Labels
────────────────────────────
All labels are right-side text labels only.
Each label can show:
• price row
• dollar difference from current price
• percent difference from current price
• level tag row
Labels use EM-space padding instead of x-offset tricks, which helps keep the labels visually staggered while still pinned to the current bar.
Different level groups have their own padding controls, and the newer Daily / Weekly / Monthly sections include more granular row padding so overlapping labels can be separated cleanly.
────────────────────────────
Important Levels Library
────────────────────────────
This version now uses my shared ImportantLevelsLinesLabels_Utilities library:
That library handles the reusable output infrastructure:
• right-side label text
• price / dollar / percent formatting
• line style resolution
• label size resolution
• bar-time horizontal level lines
• transparent text labels
• object slot arrays
• history-array pruning
• source-aware line-start routing
The script itself still owns the source engine, session behavior, candle tracking, request.security() logic, and final visibility conditions.
This keeps Candle Levels Pro cleaner internally while making the level-output system more consistent with future scripts.
────────────────────────────
How I Use It
────────────────────────────
I use Candle Levels as a price-map tool.
A few practical reads:
• HOD / LOD show where the active session has expanded.
• OPEN and PMO help frame current price against the regular and premarket starts.
• PCL shows where price is relative to the prior regular-session close.
• LTF levels help identify nearby short-term reference points.
• Daily, Weekly, and Monthly levels help organize higher-timeframe context.
• Source Candle mode helps show where a completed candle high, low, or close actually came from.
• Right-side labels make it easier to compare distance from current price without manually measuring every level.
This is not intended to be a standalone buy/sell signal tool. It is a visual reference framework for organizing important price levels, session context, and completed candle structure.
────────────────────────────
Chart Examples
────────────────────────────
Indicator

Flow Pressure OscillatorFlow Pressure Oscillator visualizes directional market pressure, trend alignment, regime quality, pullback pressure, and extended pressure conditions in a separate oscillator pane.
The tool is built to help traders read whether market pressure is leaning bullish, bearish, or neutral. It combines trend structure, EMA alignment, ATR-normalized movement, ADX, directional efficiency, volatility behavior, and volume participation into a bounded flow reading between -100 and +100.
The main Flow Trail shows the current pressure direction and strength. Positive readings indicate bullish pressure, negative readings indicate bearish pressure, and values near the zero line suggest a more neutral or mixed environment.
Regime Dots show the internal market regime state. Upper dots represent bullish regime pressure, lower dots represent bearish regime pressure, and neutral readings show that no strong directional regime is active.
The Pullback Reload Line is designed to highlight pullback pressure inside an existing bullish or bearish regime. It is not an entry signal by itself. It is meant to be used as context together with the Flow Trail, regime state, and the user’s own chart analysis.
The oscillator also highlights expansion and exhaustion-style pressure conditions. These areas can help identify when pressure is becoming stretched, accelerating, or losing momentum. They should be treated as market-context readings, not as guaranteed reversal or continuation points.
Core components
Flow Trail:
The main pressure line. It reacts to trend pressure, momentum slope, acceleration, structure alignment, volatility, and volume participation.
Zero Line:
A neutral reference level. Readings above zero show bullish pressure dominance. Readings below zero show bearish pressure dominance.
Regime Dots:
A visual regime filter for bullish, bearish, or neutral pressure conditions.
Pullback Reload Line:
A secondary pressure line designed to show pullback or reload behavior inside an active regime.
Pressure Fill:
A visual fill between the Flow Trail and the zero line to make pressure direction easier to read.
Extreme Pressure Coloring:
Highlights expanded, stretched, or exhaustion-style pressure states.
A simple way to use the oscillator is:
- Flow Trail above zero = bullish pressure is dominant;
- Flow Trail below zero = bearish pressure is dominant;
- Rising Flow Trail = pressure is strengthening;
- Falling Flow Trail = pressure is weakening;
- Regime Dots help confirm whether the broader pressure environment supports the current flow direction;
- Reload Line can help identify pullback pressure during an existing bullish or bearish regime;
- Extreme pressure areas should be used for awareness, not as automatic trade signals.
Important notes
Flow Pressure Oscillator is a market-pressure visualization tool only. It does not provide financial advice, trade recommendations, profit targets, stop losses, win-rate calculations, or performance guarantees.
The script should be used together with the trader’s own market structure, support and resistance, risk management, and confirmation process. No single oscillator should be used as a complete trading system. Indicator

The Acute Grief CurveACUTE GRIEF CURVE - a momentum oscillator for a market in mourning, for crypto
Price action is just is a grief chart. It's a running tally of how a few
million strangers feel about money they no longer have.
WHERE IT COMES FROM
In 1962 a technician named Edwin Coppock got hired by the Episcopal Church to
tell them when to buy after a crash. He decided a market clawing out of a bear
feels like a person clawing out of mourning - same shock, same numbness, same
long stupid crawl back - so he asked the clergy how long grief lasts.
They said 11 to 14 months. He typed those two numbers into a rate-of-change formula and
called it a day. That is the Coppock Curve.
WHY THE ORIGINAL DIES ON CRYPTO
Point standard Coppock at the total crypto market cap and it flatlines. Crypto went from three billion to four trillion. Early on it printed 16,000% moves; lately it prints 50% and calls it a bull run. On raw percentages the toddler years bury everything that came after, so the curve pins itself above zero for eight straight years and only dips under in 2022, once, like a smoke detector that exclusively activates during cremation.
An indicator that signals once a decade is just a commemorative plate.
So I rebuilt it.
HOW IT'S DIFFERENT
1. The Yale Bereavement Study (JAMA 2007) tracked grieving people month by month and found yearning peaks around month 4 and depression bottoms out around month 6. That's the wound. Coppock's 11–14 months is the part where the widow has already repainted the kitchen. This curve uses the 6- and 4-month rate-of-change - the actual bottom of the despair - smoothed over 5 periods, because a crowd of leveraged strangers speedruns the five stages of grief in about a long weekend, and you want the indicator watching the screaming, not the kitchen.
2. Log price, because crypto has no sense of scale. Comparing a 16,000% move to
a 50% move on a normal axis is like comparing a supernova to a birthday candle
and concluding they're both fire. Log pricing makes the math behave so the
curve oscillates around zero like a functioning adult across every cycle. You
can switch it off and watch it relapse into the classic version if you enjoy
that sort of thing.
3. A volatility filter that knows hope is a liar. This comes from the Dual
Process Model of grieving (Stroebe & Schut), which says recovery isn't a line,
it's a flailing back-and-forth nightmare, and the tell that you're really healing is
that the flailing gets quieter. Volatility is a market's flailing. So every
time the curve turns up, the indicator checks whether the shaking is calming
down or just catching its breath.
THE TWO SIGNALS
ACCEPTANCE ONSET (green): the curve turns up from below zero AND volatility is
contracting. The thrashing is subsiding. Acceptance is winning. In a market
this is the closest thing to good news, which is to say you've stopped
screaming and you're choosing to interpret that optimistically.
FALSE REPRIEVE (amber): same turn up, but volatility is still expanding. This
is the corpse twitching. You see the twitch, you call it a recovery, you re-
long with conviction, and the corpse remains, professionally, a corpse. Every
bear-market rally that ever ruined someone lives here.
Telling those two apart is the whole job. It's the difference between "the
worst is over" and "the worst would like a word."
HOW TO READ IT
Blue line is the curve. The shaded bit below zero is the acute grief zone, aka
where your timeline goes silent and the inspirational posters come out.
Background tint shows the volatility type - teal means contracting (healing),
red means expanding (don't). Signals print in the pane and on price. Optional
comparison curves let you plot the original 11–14 month clergy Coppock and the
useless-for-crypto 12–24 month integration version, so you can see, in public,
why the slow one would still be holding bags.
INPUTS
Periods are defined in MONTHS and auto-scale to your timeframe, so the grief
stays the same length whether you're on monthly, weekly, or daily. Everything's
adjustable - the peaks, the smoothing, the volatility window, the log toggle,
the filter, the shading. Alerts included, in case you want to be notified the
exact moment the market accepts its fate.
OMG USE YOUR HEAD, THIS IS A WORK IN PROGRESS
This is a context gauge, not a trade trigger. The filter is conservative - it distrusts sharp V-bottoms, because on those the volatility never calms down, which means it flagged the COVID low as suspicious. The COVID low was the buy of the decade. So yes, it's cautious the way a man on his third divorce is cautious about second dates: not always right, but you
understand where it's coming from. Volatility can also fake the green light
mid-bounce. Use it next to real market structure and your own judgment, both
of which are also flawed, but at least they're free.
It describes the emotional state of a market. It does not predict the future.
Neither do you. Neither do I (well, privately to myself I do). Now you have company.
This is an original reworking of the Coppock Curve - different periods, a log
construction, and a volatility-regime classifier bolted on from grief research,
not a stock indicator with the inputs nudged. Credit where due: Edwin Coppock
(1962), Maciejewski et al. (JAMA, 2007), and Stroebe & Schut.
Not financial advice. If you lose money using a grief indicator... I have nothing.
Indicator

Boshmann's Volatility HistBoshmann's Volatility Hist
The theory behind tracking normalized volatility is that market movement is highly cyclical, constantly alternating between periods of tight contraction and explosive expansion. Using raw volatility measures (like a flat Average True Range value) is flawed because the meaning of those points changes drastically as an asset's price scales up or down over time. By applying a statistical Z-Score to the ATR, we normalize the volatility relative to the asset's own historical baseline, allowing traders to objectively identify when price action is anomalously quiet (predicting a breakout) or unsustainably aggressive (predicting exhaustion or mean-reversion).
How the Script Works: The script calculates a standard 14-period Average True Range (ATR) to measure current price movement. It then runs a 250-period lookback to compute the rolling mean and standard deviation of that ATR, ultimately calculating a real-time Z-Score. This Z-Score is plotted as an oscillating histogram below the chart. The script uses fixed thresholds to color the histogram bars: Green for "Quiet" (Z-score < -0.5), Yellow for "Normal" (Z-score between -0.5 and 0.5), and Red for "Volatile" (Z-score > 0.5). It also plots dotted threshold lines so you can instantly see when volatility crosses into extreme territory.
Why You Should Use It: This script is the final pillar of the Boshmann's suite, engineered to be used in strict combination with the Regime Counters and the Market Direction Hist .
While the Regime Counter gives you the structural trend and the Direction Hist gives you the momentum conviction, this Volatility Hist reveals the energy state of the market. You should use this indicator because knowing the market's speed dictates your risk management and strategy timing. For example, if you spot a long string of "Quiet" (green) volatility bars while the Regime Counter just flipped to Bullish, you have found an optimal, low-risk entry before an explosive breakout. Conversely, if you are riding a trend and this histogram spikes deep into the "Volatile" (red) zone, it serves as a mathematical warning that the market is overextended, signaling that you should tighten stops or take profits before the inevitable pullback. Indicator

Boshmann's Market Direction HistBoshmann's Market Direction Hist
The theory behind a directional histogram is to visually quantify not just the direction of a trend, but its underlying momentum and the distance between moving averages. While identifying a trend regime categorizes the market into a fixed state (bull, bear, or sideways), measuring the spread between a fast and slow moving average reveals whether that trend is accelerating, decelerating, or reaching exhaustion. By projecting this spread as an oscillator around a zero line, traders can easily spot momentum divergences and gauge the true strength of a directional move.
How the Script Works: The script calculates the raw distance between a short-term moving average (20-period SMA) and a long-term moving average (100-period SMA). To ensure the indicator works seamlessly across any asset class or timeframe—whether a stock is trading at $5 or $50,000—it normalizes this distance as a percentage of the current price. It then plots this normalized momentum as a histogram. Finally, the histogram bars are painted using the exact same logic as the Regime Counters script: Green for Strong Bull, Red for Strong Bear, and Yellow for Sideways.
Why You Should Use It: This script is explicitly designed to be used in combination with the Regime Counters and Volatility Histogram scripts to form a complete, three-dimensional view of the market.
A user should use this histogram because while the Regime Counter tells you what state the market is in, the Direction Histogram tells you how strong that state is. For example, if the Regime Counter classifies the market as "Bullish" but you see the green bars on this histogram steadily shrinking toward the zero line, it is a leading indicator that upward momentum is dying long before the official regime flips. Together, the three scripts allow you to trade systematically: the Regime Counter dictates your directional bias, the Volatility script warns you of price expansion, and the Direction Histogram measures the real-time conviction pushing the trend. Indicator

Boshmann's Regime CountersSummary of Boshmann's Regime Counters
At its core, this indicator is designed to remove human subjectivity from chart reading by translating market behavior into purely objective, mathematically defined states. Rather than relying on discretionary trendlines or "gut feelings" about market speed, it uses robust statistical baselines to continuously classify the market into discrete Trend and Volatility regimes.
For TradingView users, this provides an immediate, systematic context of the market environment, which is crucial because trading strategies (like mean-reversion vs. trend-following) only perform well when aligned with the correct market state.
1. Trend Regime Classification (Directional Bias)
The indicator evaluates moving average alignments to determine the structural trend. It requires both price position and momentum to agree before declaring a strong trend:
Bull: The closing price is strictly above a long-term baseline (200 SMA) AND short-term momentum (20 SMA) is leading the medium-term momentum (100 SMA).
Bear: The closing price is below the 200 SMA AND the 20 SMA has crossed below the 100 SMA.
Sideways: Any state where the price and moving averages are in conflict or tangled.
Visuals: The chart bars are painted dynamically (Green for Bull, Red for Bear, Golden for Sideways) so the current regime is instantly visible.
2. Volatility Regime Classification (Market Speed)
Instead of using fixed point values to measure volatility (which break down across different timeframes and assets), the indicator uses an Adaptive Z-Score of the Average True Range (ATR). By looking back over a large sample size (250 periods), it calculates a rolling mean and standard deviation of the ATR. This normalizes volatility into a universal metric:
Quiet (Z-Score < -0.5): The market is contracting and experiencing significantly below-average movement.
Normal (Z-Score -0.5 to 0.5): The market is operating within its standard, expected historical variance.
Volatile (Z-Score > 0.5): The market is expanding, experiencing statistically significant, out-sized movement.
3. The Statistics Dashboard
The script anchors a real-time statistical dashboard to the chart. It tallies the exact number of bars—and calculates the overall historical percentage—spent in each specific trend and volatility regime.
What this does for TradingView users:
Strategy Alignment: By quantifying exactly how much time an asset spends trending versus chopping sideways, traders can objectively decide whether to deploy a trend-following system or a range-bound strategy on that specific asset.
Contextual Awareness: The adaptive Z-score prevents users from being caught off guard by volatility expansion, giving them a mathematical warning when the market shifts from "Quiet" accumulation into "Volatile" distribution.
Backtesting Validation: The on-chart percentages give quantitative traders immediate insight into the asset's structural personality over the loaded history (e.g., realizing an asset is only in a "Strong Bull" state 25% of the time helps set realistic win-rate expectations). Indicator

Order Blocks with Volume [Quantum Algo]Order Blocks with Volume
OVERVIEW
This indicator finds order blocks — the candles where a directional move originated before price broke market structure — and measures the buy and sell volume that traded inside each one. Every zone is drawn as a box that extends forward until price returns to it, and each active zone is labelled with its total volume and its buy/sell split, so you can tell at a glance which blocks were built on heavy participation and which were not.
It is built entirely from price and volume on the chart you apply it to. There is no repainting of confirmed zones: detection runs only on closed bars.
HOW DETECTION WORKS
1. Market structure. Confirmed swing highs and swing lows are located using a pivot of configurable length (Swing Length). A larger value isolates more significant structure and produces fewer, larger zones.
2. Break of structure. When a candle closes above the most recent confirmed swing high (bullish) or below the most recent confirmed swing low (bearish), the indicator treats it as a break of structure and looks for the order block that produced the move.
3. The order block candle. Starting from the breakout, the script steps back over the impulse candles and marks the last opposite-close candle before the move began — the last down-close candle for a bullish block, the last up-close candle for a bearish block. This is the origin of the displacement and the level price often revisits.
4. Zone range. The block is drawn from that candle using either its full high-to-low range (Wick) or its open-to-close body (Body).
VOLUME ENGINE
For each order block candle the indicator estimates how much of the traded volume was buying versus selling, using where the candle closed within its own range:
- Buy volume is weighted by how close the candle closed to its high.
- Sell volume is weighted by how close it closed to its low.
This split is shown two ways:
- Buy / Sell volume bars: two horizontal bars anchored at the left of the zone — buy on the top half, sell on the bottom half — with lengths proportional to each side. The Volume Bar Length setting controls how long they can extend (they are automatically kept inside the zone).
- Volume label: written inside the zone on the right edge, showing the total volume of the block and the buy% / sell% balance.
Volume strength is the block's volume divided by the average volume over a configurable baseline (Volume Baseline Length). It is used by the optional filter below to keep only the heaviest blocks.
ZONE LIFECYCLE
- Active. A live zone extends to the current bar and shows its volume bars and label.
- Mitigation. When price first trades back into a zone, the 50% line marks the equilibrium and an alert can fire.
- Invalidation. A zone is invalidated when price moves through its far edge. The source can be a wick touch or a candle close (Invalidation Source).
- Breaker. If "Flip Broken Zones to Breaker Blocks" is on, an invalidated zone is kept and re-coloured as a breaker, since broken support can act as resistance and vice versa.
- Historic. If "Keep Invalidated Zones (Historic)" is on, finished zones are frozen at the bar they died, re-coloured neutral, and their volume bars and text are removed to keep the chart clean.
- If neither option is on, invalidated zones are removed.
To avoid clutter the indicator will not stack a new zone on top of an existing active zone in the same area, limits the number of active zones per side, and automatically drops any zone older than the drawing range.
ON-CHART ELEMENTS
- Coloured boxes: bullish and bearish order blocks (and a neutral colour for breaker/historic).
- Two inner bars per active zone: buy (top) and sell (bottom) volume.
- A dotted line through the middle of active zones: the 50% mitigation / equilibrium level.
- Text inside active zones: total volume and buy% / sell%.
SETTINGS
Structure & Detection
- Swing Length — pivot length used to define structure. Higher = larger, more significant zones.
- Impulse Lookback (bars) — how far back to search for the origin candle after a break of structure.
- Zone Range — Wick (full range) or Body (open-to-close).
- Max Active Zones / Side — cap on simultaneously active zones per direction.
Invalidation
- Invalidation Source — Wick (a high/low piercing the zone) or Close (a candle closing beyond it).
- Flip Broken Zones to Breaker Blocks — keep and re-colour broken zones as breakers.
- Keep Invalidated Zones (Historic) — freeze finished zones instead of deleting them.
Volume Engine
- Show Volume Label — write volume and buy/sell% inside active zones.
- Show Buy / Sell Volume Bars — draw the proportional buy/sell bars.
- Volume Baseline Length — averaging length used to rate volume strength.
- Volume Bar Length (bars) — maximum length of the buy/sell bars.
Filters
- Only Show High-Volume Zones — hide blocks below the strength threshold.
- Min Volume Strength (x avg) — threshold as a multiple of average volume.
- Filter Oversized Zones — skip blocks taller than the ATR limit.
- Max Zone Height (ATR x) — the height limit, in multiples of ATR.
Style
- Bullish Zone, Bearish Zone, Buy Volume, Sell Volume, Breaker / Historic, Text — colours.
- Zone Extension (bars) — how far active zones project past the current bar.
- Show 50% Mitigation Line — toggle the equilibrium line.
ALERTS
Alerts are raised through the alert() function for two events: an order block being tapped (mitigation) and an order block being broken (breaker formed). To use them, create an alert on the indicator and choose the "Any alert() function call" condition.
HOW TO USE
Order blocks mark areas where significant orders were likely placed. Traders commonly watch for price to return to an un-mitigated block and react there, and use the buy/sell volume split and strength to judge how meaningful a block is — a block built on high, one-sided volume is generally treated as more significant than a thin one. Combine the zones with your own confirmation and risk management; this tool highlights levels, it does not generate buy or sell signals.
DISCLAIMER
Nothing here is financial advice or a guarantee of any outcome. Past behaviour of price around order blocks does not predict future results. Always do your own research and manage risk. Indicator

Miggoy's regime overlayA market-regime dashboard that scores the overall environment for swing trading and colors your chart background green, yellow, or red so you can tell at a glance whether conditions favor putting on risk.
The script grades three independent conditions, each worth one point:
1 · Price Structure — SPY stacked above its 10 EMA, with the 10 EMA above the 20 EMA. Confirms a clean short-term uptrend with price leading.
2 · Net 52-Week Highs minus Lows — More new highs than new lows across the market. A positive read means broad participation rather than a narrow rally.
3 · Volatility — Fear draining out of the tape, defined as VIX below its 20 EMA, and the 20 EMA below the 50 EMA (50 > 20 EMA > VIX). Signals a calm, trending environment rather than a spiking, defensive one.
Regime scoring
3 / 3 → GREEN — Full risk per trade, full aggression.
2 / 3 → YELLOW — Half risk, best setups only.
0–1 / 3 → RED — List building, no trades.
The chart background tints to match the regime, and a table summarizes each condition with a pass/fail check, the underlying values, and the suggested action. A "days in regime" counter tracks how long the current state has held.
Notes
All conditions are calculated on the daily timeframe regardless of your chart's timeframe, so the regime read stays consistent whether you're looking at a daily or an intraday chart.
Calculations use confirmed daily data with no lookahead, so the indicator does not repaint.
The high/low inputs default to YRHI.US and YRLO.US (52-week new highs and new lows). Adjust the symbols in settings if your data provider uses different tickers.
Alerts are included for each regime transition (green, yellow, red).
This is a decision-support tool for gauging market conditions, not a buy/sell signal generator. It tells you whether the environment supports trading, not what to trade. Indicator

Sweep Reclaim Entry Engine [trade_w_samet]🎯 Sweep Reclaim Entry Engine
Sweep Reclaim Entry Engine is a structured liquidity-sweep and reclaim analysis indicator designed to help traders study confirmed swing levels, controlled liquidity penetrations, reclaim strength, setup quality, directional alignment, and visual risk/reward models directly on the price chart.
This script focuses on one main concept:
Confirmed swing sweep and reclaim-based entry visualization.
It is not designed to mark every wick beyond every nearby high or low.
It is not designed to treat every penetration as a valid liquidity sweep.
It is not designed to create constant buy/sell labels.
Instead, the goal of Sweep Reclaim Entry Engine is to confirm structural swing levels, monitor their lifecycle, detect controlled penetrations beyond those levels, validate directional reclaims, apply configurable quality and market filters, and visualize accepted setups using one Entry level, one protective Stop Loss level, and one configurable risk/reward target.
The indicator includes:
• Confirmed swing-high and swing-low detection
• Reactive, Balanced, Structural, and Custom swing modes
• ATR-normalized level merging and proximity logic
• Fresh, Armed, Swept, Reclaimed, and Consumed level states
• Wick Only, Wick or Body, and Body Required sweep modes
• Minimum and maximum ATR-normalized sweep-depth filters
• First-penetration-only logic
• Multi-level sweep selection
• Dual-side sweep protection
• Same Candle, Fast, Flexible, and Custom reclaim windows
• Loose, Balanced, Strict, and Custom reclaim-strength modes
• Reclaim close-buffer, close-location, body-strength, and wick-rejection checks
• A transparent 0–100 setup-quality score
• A+, A, and B setup grades
• Loose, Balanced, Strict, and Custom quality-filter modes
• Relative-volume quality context
• Highest Quality and Nearest Level candidate-selection modes
• Direction, cooldown, cluster, duplicate-bar, and opposite-conflict controls
• Chart EMA, confirmed higher-timeframe EMA, and Combined EMA bias
• Optional volatility and market-efficiency filtering
• Entry ATR and Sweep Extreme stop-loss models
• A configurable 0.25R to 15R target
• One-active-trade-at-a-time logic
• Stop First and Target First same-bar assumptions
• Active TP / SL boxes and Entry / TP / SL lines
• SL-specific visual cleanup
• Important-only sweep-label filtering
• Full, Clean, Minimal, and Mobile chart profiles
• Full, Compact, Trade Only, and Off dashboard modes
• Adjustable marker, label, result, and dashboard sizes
• Crimson, Ice Blue, Monochrome, and fully custom colors
• Static TradingView alert conditions
• Optional dynamic alert() messages
• Compact bottom-right dashboard
• Confirmed-close permanent signals
• Confirmed higher-timeframe data handling
The purpose of this script is to help users visually study where a confirmed swing-level sweep is followed by a qualified directional reclaim.
It should be treated as a chart-analysis and educational decision-support tool.
It is not financial advice.
It is not an automated trading system.
It does not guarantee profitable trades.
It does not execute broker orders.
It does not replace personal analysis, risk management, or trade validation.
━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━
At a high level, Sweep Reclaim Entry Engine does the following:
• Detects confirmed bullish and bearish swing pivots.
• Stores accepted swing highs and swing lows in separate internal level memories.
• Prevents near-duplicate levels using ATR-based merge tolerance.
• Tracks whether each level is Fresh, Armed, Swept, Reclaimed, or Consumed.
• Arms a level when price moves within the selected ATR distance.
• Detects a new penetration beyond an eligible swing level.
• Measures penetration depth relative to ATR.
• Classifies the sweep as wick-based or body-based.
• Applies minimum depth, maximum depth, first-interaction, multi-level, and dual-side rules.
• Moves the accepted level into the Swept state.
• Waits for price to reclaim the level within the selected reclaim window.
• Checks reclaim close buffer, close location, candle body strength, candle direction, and wick rejection.
• Calculates a 0–100 setup-quality score.
• Assigns an internal A+, A, or B grade.
• Applies the selected minimum-quality requirement.
• Compares multiple eligible reclaim candidates.
• Applies direction, trend-bias, market, cooldown, clustering, duplicate, and conflict rules.
• Confirms final BUY and SELL reclaim signals only after candle close.
• Projects Entry, Stop Loss, and one configurable take-profit target.
• Maintains one active visual trade model at a time.
• Tracks TP and SL events after the entry candle.
• Applies the selected same-candle TP / SL assumption.
• Preserves successful models when historical display is enabled.
• Deletes failed-model boxes, lines, and original signal labels after SL.
• Leaves only a small CLOSED SL HIT label for failed models.
• Displays engine, bias, quality, signal, and trade information in the bottom-right dashboard.
• Provides sweep, signal, grade, trade-open, TP, and SL alerts.
The script is intentionally built as a structured sequence.
It does not include machine-learning prediction.
It does not claim that every sweep will reverse.
It does not treat the quality score as a probability.
It provides a transparent way to study confirmed swing sweeps, directional reclaims, and their visual trade lifecycle.
━━━━━━━━━━━━━━━━━━━━━━
🧠 CORE IDEA
━━━━━━━━━━━━━━━━━━━━━━
The core idea behind Sweep Reclaim Entry Engine is based on the difference between a liquidity penetration and a confirmed reclaim.
A sweep occurs when price trades beyond a previously confirmed swing high or swing low.
A reclaim occurs when price returns through that level and closes with enough directional strength to satisfy the active rules.
The engine does not treat the sweep itself as an entry.
Instead, it separates the process into distinct stages:
Confirmed swing
→ managed level
→ level approach
→ valid penetration
→ sweep classification
→ reclaim window
→ reclaim confirmation
→ quality scoring
→ final filtering
→ confirmed entry model
For a bullish setup, the engine studies a penetration below a confirmed swing low and a later close back above that level.
For a bearish setup, the engine studies a penetration above a confirmed swing high and a later close back below that level.
The reclaim can occur on the same candle or within a configurable number of bars.
The final setup can then be evaluated using:
• sweep depth
• reclaim close quality
• wick rejection
• candle-body strength
• level freshness
• relative volume
• displacement
• market condition
• level cleanliness
• chart EMA alignment
• confirmed higher-timeframe EMA alignment
• cooldown and cluster rules
• opposite-signal conflict handling
The goal is not to maximize signal quantity.
The goal is to create an understandable process that explains how a stored swing level becomes a sweep candidate, how that sweep becomes a reclaim candidate, and how the final entry model is accepted or rejected.
━━━━━━━━━━━━━━━━━━━━━━
🧩 WHY THIS SCRIPT IS NOT A SIMPLE BUY/SELL INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
Sweep Reclaim Entry Engine is not intended to be used as a blind buy/sell system.
The script is structured as a visual review workflow:
A pivot becomes confirmed
→ the swing level is stored
→ duplicate levels are filtered
→ price approaches the level
→ the level becomes Armed
→ price creates a new penetration
→ penetration type and depth are validated
→ the level becomes Swept
→ the reclaim window opens
→ reclaim strength is evaluated
→ a quality score is calculated
→ the setup receives a grade
→ eligible candidates are compared
→ execution filters are checked
→ the signal must remain valid at candle close
→ Entry, SL, and TP are projected
→ the active model is monitored
→ the model closes at TP or SL
→ the visual result is archived or cleaned
Each stage serves a specific purpose.
The confirmed-pivot engine defines the structural reference.
The level-memory engine prevents the script from treating all historical highs and lows as permanently active.
The Armed state separates a distant level from a level that price is actively approaching.
The sweep engine distinguishes a controlled penetration from a deep breakout.
The reclaim engine defines what qualifies as a directional return through the level.
The quality engine combines several independent setup characteristics.
The execution engine prevents clustered, duplicate, conflicting, or bias-opposed entries.
The trade model standardizes the visual Entry, risk, and reward references.
The dashboard explains the engine state and active model.
This makes the script a structured sweep-reclaim analysis tool, not a guaranteed signal generator.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ HOW THE SCRIPT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The script operates through several connected systems.
First, it confirms swing highs and swing lows using the selected pivot sensitivity.
Reactive mode uses shorter pivot lengths.
Balanced mode uses medium pivot lengths.
Structural mode uses wider pivot lengths and is the default.
Custom mode allows manual left-side and right-side pivot lengths.
float confirmedSwingHigh = ta.pivothigh(high, swingLeft, swingRight)
float confirmedSwingLow = ta.pivotlow(low, swingLeft, swingRight)
int confirmedHighBar = bar_index - swingRight
int confirmedLowBar = bar_index - swingRight
After confirmation, accepted swing levels are stored in separate high-side and low-side arrays.
Each level stores contextual information including:
• level price
• original pivot bar
• lifecycle state
• interaction count
• sweep bar
• sweep depth
• sweep extreme
• sweep type
• reclaim bar
• visual line reference
When price approaches a stored level, the level can move from Fresh to Armed.
When price creates a new penetration beyond the level, the engine checks:
• penetration mode
• minimum ATR depth
• maximum ATR depth
• first-attempt permission
• multi-level selection
• dual-side sweep protection
f_isValidHighSweep(float levelPrice, int attempts) =>
float depthATR = (high - levelPrice) / safeATR
int kind = f_highSweepKind(levelPrice)
bool depthValid = depthATR >= minSweepDepthATR and depthATR <= effectiveMaxSweepDepthATR
bool attemptValid = not firstInteractionOnly or attempts == 0
bool valid = f_isNewHighPenetration(levelPrice) and depthValid and attemptValid and f_modeAcceptsKind(kind)
valid
f_isValidLowSweep(float levelPrice, int attempts) =>
float depthATR = (levelPrice - low) / safeATR
int kind = f_lowSweepKind(levelPrice)
bool depthValid = depthATR >= minSweepDepthATR and depthATR <= effectiveMaxSweepDepthATR
bool attemptValid = not firstInteractionOnly or attempts == 0
bool valid = f_isNewLowPenetration(levelPrice) and depthValid and attemptValid and f_modeAcceptsKind(kind)
valid
A valid sweep moves the level into the Swept state.
The reclaim engine then waits for price to close back through the level within the selected window.
The reclaim must pass every enabled strength requirement.
The accepted candidate receives a quality score and grade.
If more than one candidate qualifies, the active Candidate Selection mode chooses the final candidate.
The final signal must also pass direction, bias, market, cooldown, cluster, duplicate-bar, and conflict rules.
Only after the bar closes with all conditions still valid can the permanent BUY or SELL reclaim signal and visual trade model appear.
━━━━━━━━━━━━━━━━━━━━━━
🟢 BULLISH SWEEP RECLAIM LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bullish sweep-reclaim setup begins with a confirmed swing low.
The swing low must be stored and remain eligible.
Price can then move close enough to place the level in the Armed state.
A bullish sweep is created when price penetrates below the swing-low level and the penetration satisfies the active sweep rules.
The engine may require:
• a wick-only penetration
• a wick or body penetration
• body participation beyond the level
• a minimum ATR-normalized depth
• a maximum ATR-normalized depth
• the first valid penetration attempt
• selection as the nearest valid level
• no simultaneous high-side sweep
After the low-side sweep, the bullish reclaim must occur inside the selected reclaim window.
The reclaim can require:
• a close above the swept level
• an ATR-based close buffer above the level
• a high close location inside the candle
• minimum body strength relative to ATR
• a bullish candle body when enabled
• minimum lower-wick rejection for same-candle reclaims
• a final score above the active quality threshold
• permission from the selected signal direction
• bullish chart and/or HTF EMA alignment
• permission from the active market-condition filter
• cooldown and cluster permission
• no stronger bearish conflict
f_isValidLowReclaim(int index) =>
bool valid = false
if index >= 0 and index < array.size(lowPrices) and barstate.isconfirmed
int state = array.get(lowStates, index)
int sweepBar = array.get(lowSweepBars, index)
if state == STATE_SWEPT and sweepBar >= 0
float levelPrice = array.get(lowPrices, index)
int barsAfterSweep = bar_index - sweepBar
bool windowPass = barsAfterSweep >= 0 and barsAfterSweep <= reclaimWindowBars
bool closePass = close >= levelPrice + safeATR * reclaimCloseBufferATR
bool locationPass = f_bullCloseLocation() >= reclaimCloseLocationThreshold
bool bodyPass = f_bodyATR() >= reclaimBodyStrengthATR
bool directionPass = not requireDirectionalCandle or close > open
bool sameBar = barsAfterSweep == 0
bool wickPass = not requireSameCandleWick or not sameBar or f_lowerWickRatio() >= reclaimWickThreshold
valid := windowPass and closePass and locationPass and bodyPass and directionPass and wickPass
valid
When every enabled rule passes at candle close, the script displays a BUY RECLAIM label.
If the visual trade model is enabled and no trade is active, the setup creates:
• Entry at the confirmed signal-bar close
• Stop Loss below entry or below the sweep extreme
• TP above entry
• blue/cyan reward box
• red risk box
• thick white Entry line
• blue TP line
• red SL line
This does not mean price must continue upward.
It means the configured bullish sweep-reclaim conditions were confirmed at the close of that candle.
━━━━━━━━━━━━━━━━━━━━━━
🔴 BEARISH SWEEP RECLAIM LOGIC
━━━━━━━━━━━━━━━━━━━━━━
A bearish sweep-reclaim setup begins with a confirmed swing high.
The swing high must be stored and remain eligible.
Price can then move close enough to place the level in the Armed state.
A bearish sweep is created when price penetrates above the swing-high level and the penetration satisfies the active sweep rules.
The engine may require:
• a wick-only penetration
• a wick or body penetration
• body participation beyond the level
• a minimum ATR-normalized depth
• a maximum ATR-normalized depth
• the first valid penetration attempt
• selection as the nearest valid level
• no simultaneous low-side sweep
After the high-side sweep, the bearish reclaim must occur inside the selected reclaim window.
The reclaim can require:
• a close below the swept level
• an ATR-based close buffer below the level
• a low close location inside the candle
• minimum body strength relative to ATR
• a bearish candle body when enabled
• minimum upper-wick rejection for same-candle reclaims
• a final score above the active quality threshold
• permission from the selected signal direction
• bearish chart and/or HTF EMA alignment
• permission from the active market-condition filter
• cooldown and cluster permission
• no stronger bullish conflict
When every enabled rule passes at candle close, the script displays a SELL RECLAIM label.
If the visual trade model is enabled and no trade is active, the setup creates:
• Entry at the confirmed signal-bar close
• Stop Loss above entry or above the sweep extreme
• TP below entry
• blue/cyan reward box
• red risk box
• thick white Entry line
• blue TP line
• red SL line
This does not mean price must continue downward.
It means the configured bearish sweep-reclaim conditions were confirmed at the close of that candle.
━━━━━━━━━━━━━━━━━━━━━━
💎 SWEEP RECLAIM QUALITY FILTER SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
The script includes a multi-component quality system to reduce low-context reclaim signals.
This is important because not every sweep has the same structural meaning and not every reclaim candle has the same directional strength.
The quality engine evaluates eight components:
Sweep Depth — maximum 15 points
Measures where the penetration sits inside the active minimum-to-maximum sweep range.
The score favors a controlled sweep depth rather than automatically rewarding the deepest penetration.
Reclaim Close — maximum 20 points
Measures the directional location of the candle close.
A bullish setup receives more points when the reclaim closes near the top of the candle.
A bearish setup receives more points when the reclaim closes near the bottom.
Wick Rejection — maximum 15 points
Measures the directional rejection wick.
For multi-bar reclaims, the engine can also consider the stored sweep type and current reclaim structure.
Level Freshness — maximum 10 points
Newer levels generally receive more freshness points than levels that have remained active for a long time.
Relative Volume — maximum 10 points
Compares current volume with the selected baseline length.
When useful volume is not available, the engine avoids treating the setup as automatically invalid.
Displacement — maximum 15 points
Combines candle-body strength and the distance reclaimed through the level.
Market Condition — maximum 10 points
Uses candle range and ATR-regime information.
Level Cleanliness — maximum 5 points
Rewards levels with fewer prior interaction attempts.
The total is rounded and limited to 0–100.
float qualityScore = math.min(100.0, math.max(0.0, math.round(
sweepScore + closeScore + wickScore + freshnessScore +
volumeScore + displacementScore + marketScore + cleanlinessScore
)))
The quality score is not a win probability.
It is not a verified accuracy percentage.
It is an internal measurement of how closely the completed setup matches the selected structural rules.
━━━━━━━━━━━━━━━━━━━━━━
📏 SWEEP / ATR FILTER
━━━━━━━━━━━━━━━━━━━━━━
The sweep-depth filter measures the penetration beyond a swing level relative to ATR.
For a high-side sweep:
Sweep Depth = (High − Swing High) / ATR.
For a low-side sweep:
Sweep Depth = (Swing Low − Low) / ATR.
Minimum Sweep Depth rejects penetrations that may be too small to represent a meaningful liquidity event.
Maximum Sweep Depth rejects penetrations that may be too deep to represent a controlled sweep and may instead behave more like a breakout.
The default values are:
Minimum Sweep Depth = 0.05 ATR.
Maximum Sweep Depth = 0.80 ATR.
ATR normalization allows the threshold to adapt to changing volatility.
A 0.20 ATR sweep represents a relative move rather than a fixed number of points.
This helps the engine operate across different price scales.
However, ATR normalization does not make one configuration universally suitable.
A symbol with session gaps, irregular volume, or unusual volatility can still behave differently from another market.
A deeper sweep is not automatically a better setup.
Sweep depth is only one component of the complete reclaim process.
━━━━━━━━━━━━━━━━━━━━━━
🕯️ DISPLACEMENT QUALITY FILTER
━━━━━━━━━━━━━━━━━━━━━━
The displacement component evaluates whether the reclaim candle moves with enough directional force.
The engine considers:
• candle-body size relative to ATR
• distance closed beyond the reclaimed level
• bullish or bearish directional recovery
For bullish setups, stronger displacement generally means:
• a larger bullish body
• a close further above the reclaimed swing low
For bearish setups, stronger displacement generally means:
• a larger bearish body
• a close further below the reclaimed swing high
Reclaim Strength Mode can also impose a minimum body-size requirement before the setup reaches the quality-scoring stage.
Loose mode allows smaller directional bodies.
Balanced mode uses moderate requirements.
Strict mode requires stronger completed-candle behavior.
Custom mode exposes the manual threshold.
Displacement is not used as a prediction.
It is used to measure whether the completed reclaim candle demonstrates the selected degree of directional response.
━━━━━━━━━━━━━━━━━━━━━━
📊 REACTION STRENGTH FILTER
━━━━━━━━━━━━━━━━━━━━━━
The reaction-strength layer evaluates the candle that confirms the reclaim.
The active rules can include:
• close through the swept level
• ATR-based close buffer
• directional close location
• body strength relative to ATR
• bullish or bearish candle direction
• same-candle rejection wick
Reclaim Strength Mode provides:
Loose
Uses lower close-buffer, close-location, body-strength, and wick-rejection requirements.
Balanced
Uses moderate thresholds.
Strict
Uses the strongest built-in thresholds and is the default.
Custom
Uses the manual values selected by the user.
Strict mode applies:
• 0.05 ATR reclaim close buffer
• 0.70 directional close-location threshold
• 0.15 ATR minimum body strength
• 0.28 same-candle wick-rejection ratio
Require Directional Candle Body can additionally require:
• close above open for bullish reclaims
• close below open for bearish reclaims
Require Same-Candle Wick Rejection applies the wick requirement when the sweep and reclaim occur on the same candle.
The reaction-strength system is designed to distinguish a simple touch from a stronger completed directional response.
━━━━━━━━━━━━━━━━━━━━━━
🧼 CONFIRMED RECLAIM FILTER
━━━━━━━━━━━━━━━━━━━━━━
The reclaim layer requires the setup to remain valid at candle close.
Available reclaim windows include:
Same Candle
The penetration and reclaim must complete on the same candle.
Fast
The reclaim can occur on the sweep candle or the next candle.
Flexible
The reclaim can occur within three bars and is the default.
Custom
The user selects the maximum number of bars.
The engine stores the sweep bar and compares the current bar with the allowed reclaim window.
The sweep state timeout is automatically prevented from becoming shorter than the active reclaim window.
A reclaimed setup can also be blocked by:
• insufficient close buffer
• weak close location
• weak candle body
• missing directional body
• missing same-candle wick rejection
• low quality score
• direction restriction
• chart EMA misalignment
• higher-timeframe EMA misalignment
• market-condition failure
• active-trade restriction
• cooldown
• same-direction clustering
• duplicate-bar protection
• opposite-direction conflict
Final permanent BUY and SELL signals require confirmed-bar logic.
This means an unfinished realtime candle can temporarily trade beyond a level, but it does not become a permanent reclaim signal unless the conditions remain valid when the bar closes.
━━━━━━━━━━━━━━━━━━━━━━
🎯 ENTRY MODEL
━━━━━━━━━━━━━━━━━━━━━━
When a final BUY or SELL reclaim signal passes every enabled condition, the script can create a visual entry model.
The Entry reference is the close of the confirmed signal candle.
The engine stores:
• trade direction
• entry bar
• entry price
• stop price
• risk distance
• selected RR
• target price
• setup quality
• setup grade
The trade model opens only when:
• Enable Trade Model is active
• no visual trade is already active
• the final reclaim signal is confirmed
• the calculated risk distance is larger than the symbol’s minimum tick
• same-bar reopening is permitted when the previous model closed on the same candle
if enableTradeModel and not tradeActive and (allowSignalOnExitBar or not tradeClosedThisBar)
if buyReclaimSignal
float sweepExtreme = array.get(lowSweepExtremes, selectedLowReclaimIndex)
float candidateStop = stopLossMode == "Entry ATR Multiplier" ?
close - safeATR * stopATRMultiplier :
sweepExtreme - safeATR * stopBufferATR
float candidateRisk = close - candidateStop
The entry model is a visual analysis reference.
It is not a broker market order.
It does not include spread, slippage, commission, latency, or partial fills.
━━━━━━━━━━━━━━━━━━━━━━
🛑 ATR STOP-LOSS MODEL
━━━━━━━━━━━━━━━━━━━━━━
The script includes two stop-placement models.
Entry ATR Multiplier
For BUY setups:
Stop = Entry − ATR × multiplier.
For SELL setups:
Stop = Entry + ATR × multiplier.
This is the default mode.
The default Entry ATR Stop Multiplier is 2.00 ATR.
The multiplier can be adjusted from 0.10 to 15.00.
Sweep Extreme + ATR Buffer
For BUY setups:
Stop = stored low-side sweep extreme − ATR buffer.
For SELL setups:
Stop = stored high-side sweep extreme + ATR buffer.
The default Sweep-Extreme Buffer is 0.10 ATR.
float candidateStop = stopLossMode == "Entry ATR Multiplier" ?
close - safeATR * stopATRMultiplier :
sweepExtreme - safeATR * stopBufferATR
The selected stop determines the visual risk distance.
That risk distance also determines the take-profit distance.
The displayed stop is a planning reference only.
It does not place or manage a broker stop order.
━━━━━━━━━━━━━━━━━━━━━━
🎯 TAKE-PROFIT RR MODEL
━━━━━━━━━━━━━━━━━━━━━━
The script uses one configurable take-profit target.
The target is calculated from the distance between Entry and Stop Loss.
For BUY models:
TP = Entry + Risk × RR.
For SELL models:
TP = Entry − Risk × RR.
The Risk / Reward Target can be adjusted from:
0.25R to 15.00R.
The default is 2.00R.
activeTradeRisk := candidateRisk
activeTradeRR := tradeRiskReward
activeTradeTarget := close + candidateRisk * tradeRiskReward
The displayed RR controls the geometric distance of the projected target.
It does not represent a performance claim.
It does not guarantee that price will reach the target.
Changing the stop model or stop multiplier changes the target distance because both levels are based on the same initial risk.
━━━━━━━━━━━━━━━━━━━━━━
📦 ACTIVE TP / SL BOX SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
When a confirmed reclaim model opens, the script can draw:
• blue/cyan TP box
• red SL box
• thick white Entry line
• blue TP line
• red SL line
• BUY RECLAIM or SELL RECLAIM label
The active boxes and lines extend to the right as new candles appear.
The Entry line is intentionally pure white and visually thicker than the TP and SL references.
When TP is reached:
• the trade model closes
• active boxes and lines stop at the closing bar
• the TP result label appears
• completed visuals can remain when Show Historical Trades is enabled
• completed visuals can be faded using Completed Trade Transparency
When SL is reached:
• the TP box is deleted
• the SL box is deleted
• the Entry line is deleted
• the TP line is deleted
• the SL line is deleted
• the original BUY or SELL signal label associated with that trade is deleted
• only a small CLOSED SL HIT label remains
This SL-specific cleanup keeps failed models visually concise.
The active trade model is educational and bar-based.
It does not simulate real broker execution.
━━━━━━━━━━━━━━━━━━━━━━
🚦 ONE ACTIVE TRADE AT A TIME
━━━━━━━━━━━━━━━━━━━━━━
The script includes one-active-trade-at-a-time logic.
If a visual trade model is active, the engine does not open another trade model until the current model closes.
Block Signals During Active Trade can also prevent new final signal labels from being accepted while the active model is open.
Allow New Signal on Exit Bar controls whether a new model can open on the same candle that closes the current model.
The default is disabled.
This design separates:
• market-level calculation
• sweep and reclaim detection
• permission to create a new trade model
The engine can continue updating structural levels and market context while a model is active.
However, the one-active-model rule prevents overlapping TP / SL boxes and conflicting lifecycle states.
This is a visual-management rule.
It is not a restriction on the user’s personal trading activity.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ SAME-CANDLE TP / SL HANDLING
━━━━━━━━━━━━━━━━━━━━━━
The script begins checking TP and SL after the entry candle.
If both TP and SL are touched on the same later candle, standard OHLC data does not reveal the actual intrabar sequence.
The script therefore provides two selectable assumptions:
Stop First
The stop is processed before the target.
This is the default and more conservative assumption.
Target First
The target is processed before the stop.
This is the more optimistic assumption.
Neither option reproduces exact tick-level broker execution.
The model does not include:
• bid/ask spread
• slippage
• order latency
• partial fills
• queue priority
• execution venue rules
• intrabar tick order
Same-candle handling is a modeling choice required by the limits of standard bar data.
━━━━━━━━━━━━━━━━━━━━━━
🏷️ SWEEP RECLAIM LABELS
━━━━━━━━━━━━━━━━━━━━━━
The script uses separate labels for sweep events, reclaim signals, and trade results.
Sweep labels can display:
SWEEP HIGH
or:
SWEEP LOW
The Sweep Label Filter can show:
Important Only
Only sweeps that meet the active importance threshold receive visible labels.
All Valid
Every accepted sweep can receive a visible label.
The default Minimum Sweep Importance is 65.
BUY and SELL reclaim labels can use three display styles:
Full
Example:
▲ A+ BUY RECLAIM ▲
QUALITY • 87/100
or:
▼ A+ SELL RECLAIM ▼
QUALITY • 84/100
Compact
Displays a shorter direction, grade, and score format.
Icon
Displays a minimal directional icon and optional score.
Show Grade on Signal Labels controls A+, A, or B display.
Show Score on Signal Labels controls the 0–100 score display.
All dynamic label text uses bold and italic formatting.
Independent size controls are available for:
• sweep labels
• BUY / SELL signal labels
• TP / SL result labels
• confirmed pivot triangle markers
━━━━━━━━━━━━━━━━━━━━━━
📍 SWING LEVEL DISPLAY MODES
━━━━━━━━━━━━━━━━━━━━━━
The indicator includes several level-display modes.
All Active
Displays eligible Fresh, Armed, Swept, and Reclaimed swing levels according to the active color and line-style rules.
Armed + Events
Focuses on Armed, Swept, and Reclaimed levels.
Events Only
Shows levels primarily when a sweep or reclaim event has occurred.
Hidden
Keeps the level engine active while removing swing-level lines from the chart.
Level Line Style provides:
Adaptive
Changes the line appearance according to level state.
Solid
Uses solid lines.
Dashed
Uses dashed lines.
Dotted
Uses dotted lines.
Show Swing-High Levels and Show Swing-Low Levels can independently control each side.
Fade Older Levels can reduce the opacity of older stored levels.
Level Width controls line thickness.
The display mode affects chart presentation only.
It does not change the underlying sweep and reclaim calculations.
━━━━━━━━━━━━━━━━━━━━━━
🧹 LEVEL INVALIDATION
━━━━━━━━━━━━━━━━━━━━━━
Stored levels do not remain eligible forever.
A level can be removed or retired because:
• it exceeds Maximum Level Age
• a confirmed breakout exceeds the allowed invalidation distance
• its sweep state exceeds the active timeout
• it completes its reclaimed hold period
• its first penetration is rejected while First Penetration Only is active
• it is consumed after failing a final execution filter
• the maximum active-level capacity removes an older level
Breakout Invalidation uses ATR-normalized distance.
This helps distinguish a controlled sweep from a confirmed close that travels too far beyond an unswept level.
Sweep State Timeout limits how long a Swept level can wait for reclaim.
Reclaimed Level Hold Bars controls how long the line remains highlighted after a successful reclaim.
Consume Filtered Reclaims determines whether a reclaim candidate rejected by direction, bias, market, cooldown, cluster, or conflict rules is permanently retired.
Removing stale or invalid levels helps reduce repeated signals from outdated price references.
━━━━━━━━━━━━━━━━━━━━━━
📟 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━
The script includes a dashboard positioned in the bottom-right corner.
Dashboard modes include:
Full
Displays the broadest engine diagnostics.
Compact
Shows a reduced selection of important engine and trade information.
Trade Only
Focuses on the active trade lifecycle.
Off
Hides the dashboard.
The Full dashboard can display:
• active swing and reclaim configuration
• quality-filter mode
• Fresh, Armed, Swept, and Reclaimed level counts
• last sweep side
• last sweep type
• sweep depth
• last reclaim signal
• reclaim delay
• close location
• candle-body strength
• setup grade
• setup-quality score
• quality-component information
• selected candidate mode
• signal direction
• cooldown state
• trend-bias state
• market state
• active level
• latest block reason
• trade state
• Entry
• Stop
• Target
• risk distance
• selected RR
• total visual models
• wins and losses
• internal net R
• last model result
• current and best internal streaks
The dashboard is not TradingView Strategy Tester.
Its trade counters are based on the indicator’s own educational bar-based model.
They do not include spread, commission, slippage, latency, or real broker execution.
━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERT SYSTEM
━━━━━━━━━━━━━━━━━━━━━━
Sweep Reclaim Entry Engine includes static TradingView alert conditions for:
• Swing High Swept
• Swing Low Swept
• Any Swing Sweep
• BUY Reclaim Confirmed
• SELL Reclaim Confirmed
• Any Reclaim Signal
• A+ Sweep Reclaim
• A Sweep Reclaim
• B Sweep Reclaim
• Sweep Reclaim Trade Opened
• Sweep Reclaim TP Hit
• Sweep Reclaim SL Hit
The script also includes optional dynamic alert() messages.
Dynamic messages can include:
• direction
• symbol
• timeframe
• grade
• quality score
• reclaimed level
• signal close
• Entry
• Stop Loss
• TP
• RR
• stop mode
• final model result
Dynamic Signal Alerts: A+ Only can restrict dynamic final-signal alerts to A+ setups.
Alert filtering affects alert delivery only.
It does not change chart calculations.
Alerts are monitoring tools.
They do not execute trades or place broker orders.
━━━━━━━━━━━━━━━━━━━━━━
🔔 HOW TO USE ALERTS
━━━━━━━━━━━━━━━━━━━━━━
A practical alert workflow:
1. Add Sweep Reclaim Entry Engine to the chart.
2. Select the desired swing, sweep, reclaim, quality, bias, and trade-model settings.
3. Open TradingView’s Create Alert window.
4. Select the indicator as the alert condition.
5. Choose the required static condition.
6. Use BUY Reclaim Confirmed or SELL Reclaim Confirmed for direction-specific signals.
7. Use Any Reclaim Signal for either direction.
8. Use A+, A, or B conditions when grade-specific monitoring is needed.
9. Enable Dynamic alert() Messages when detailed runtime messages are preferred.
10. Select Any alert() function call for dynamic messages.
11. Choose an alert frequency suitable for confirmed-candle monitoring.
12. Test the alert before depending on it.
13. Confirm every event with personal analysis and risk management.
Alert delivery can depend on:
• TradingView servers
• the user’s alert settings
• symbol data availability
• chart timeframe
• realtime feed status
• webhook destination availability
The indicator cannot guarantee alert delivery or external execution.
━━━━━━━━━━━━━━━━━━━━━━
🧪 HOW TO USE THE INDICATOR
━━━━━━━━━━━━━━━━━━━━━━
A practical workflow:
1. Add Sweep Reclaim Entry Engine to a standard candlestick chart.
2. Begin with the default Structural swing mode.
3. Keep Reclaim Strength Mode on Strict while learning the engine.
4. Keep Quality Filter Mode on Strict when a selective default is preferred.
5. Confirm that the selected higher timeframe is above the chart timeframe.
6. Observe the stored swing-high and swing-low levels.
7. Watch for a level to move from Fresh to Armed.
8. Review whether the penetration appears controlled rather than excessively deep.
9. Wait for the reclaim candle to close.
10. Review the BUY or SELL label, grade, and quality score.
11. Check the bottom-right dashboard for bias, market state, block reason, and active trade.
12. Treat Entry, SL, and TP as visual references only.
13. Compare the setup with personal structure, liquidity, session, volatility, and risk rules.
14. Use alerts for monitoring rather than blind execution.
15. Test the exact symbol, timeframe, session, and settings personally used.
16. Review historical TP models and concise CLOSED SL HIT labels to understand the visual lifecycle.
The indicator is best used as a structured sweep-reclaim review tool.
It should not be used as an automatic decision-maker.
━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS REFERENCE
━━━━━━━━━━━━━━━━━━━━━━
⚙️ Core Swing Engine
Swing Mode
Selects Reactive, Balanced, Structural, or Custom.
Custom Left Bars
Controls left-side pivot sensitivity in Custom mode.
Custom Right Bars
Controls right-side pivot confirmation in Custom mode.
ATR Length
Controls ATR normalization throughout the engine.
━━━━━━━━━━━━━━━━━━━━━━
📍 Level Management
Maximum Active Levels Per Side
Limits stored swing highs and lows separately.
Maximum Level Age
Removes old inactive levels.
Level Merge Tolerance — ATR
Prevents near-duplicate swing levels.
Armed Distance — ATR
Controls how close price must move before a Fresh level becomes Armed.
Breakout Invalidation — ATR
Controls the confirmed-close distance that invalidates an unswept level.
━━━━━━━━━━━━━━━━━━━━━━
🌊 Sweep Detection
Sweep Penetration Mode
Selects Wick Only, Wick or Body, or Body Required.
Minimum Sweep Depth — ATR
Rejects insignificant penetrations.
Maximum Sweep Depth — ATR
Rejects excessively deep penetrations.
First Penetration Only
Allows only the first interaction attempt.
Multi-Level Sweep Handling
Selects Nearest Valid Level or All Valid Levels.
Block Dual-Side Sweep Bars
Prevents one candle from registering both a high-side and low-side sweep.
Sweep State Timeout
Controls how long a Swept level can wait for reclaim.
━━━━━━━━━━━━━━━━━━━━━━
✅ Reclaim Confirmation
Reclaim Window
Selects Same Candle, Fast, Flexible, or Custom.
Custom Reclaim Bars
Controls the reclaim window in Custom mode.
Reclaim Strength Mode
Selects Loose, Balanced, Strict, or Custom.
Custom Close Buffer — ATR
Controls reclaim distance beyond the level.
Custom Close Location
Controls directional close quality.
Custom Body Strength — ATR
Controls minimum reclaim-candle body size.
Custom Wick Rejection Ratio
Controls same-candle rejection-wick quality.
Require Directional Candle Body
Requires bullish or bearish candle direction.
Require Same-Candle Wick Rejection
Requires the active wick threshold for immediate reclaims.
Block Dual-Side Reclaim Bars
Prevents both directions from confirming on one candle.
Reclaimed Level Hold Bars
Controls how long a reclaimed level remains highlighted.
━━━━━━━━━━━━━━━━━━━━━━
💎 Quality Engine
Quality Filter Mode
Selects Loose, Balanced, Strict, or Custom.
Custom Minimum Quality
Controls the manual minimum from 50 to 100.
Include Relative Volume
Adds the relative-volume component.
Relative Volume Length
Controls the volume baseline.
Volatility Regime Length
Controls the ATR-regime baseline.
Show Grade on Signal Labels
Displays A+, A, or B.
Show Score on Signal Labels
Displays the 0–100 quality score.
━━━━━━━━━━━━━━━━━━━━━━
🎯 Signal Execution
Signal Direction
Selects Both, Long Only, or Short Only.
Candidate Selection
Selects Highest Quality or Nearest Level.
Cooldown Mode
Selects Off, Any Signal, or Same Direction.
Signal Cooldown Bars
Controls the time-based delay.
Use Same-Direction Cluster Filter
Blocks nearby repeated signals.
Minimum Signal Distance — ATR
Controls the required distance from the previous same-direction signal.
Block Duplicate Signal Bar
Prevents repeated final signals on one candle.
Opposite-Signal Conflict
Selects Block Both, Higher Quality, BUY Priority, or SELL Priority.
Consume Filtered Reclaims
Retires reclaim candidates rejected by final execution filters.
━━━━━━━━━━━━━━━━━━━━━━
🧭 Bias & Market Filters
Trend Bias Mode
Selects Off, Chart EMA, Higher Timeframe EMA, or Combined EMA.
Chart EMA Length
Controls current-timeframe trend bias.
Higher Timeframe
Selects the HTF context.
Higher-Timeframe EMA Length
Controls the confirmed HTF EMA.
Require EMA Slope Agreement
Adds directional EMA slope.
Market Condition Filter
Selects Off, Volatility, Efficiency, or Combined.
Efficiency Length
Controls directional-efficiency calculation.
Minimum Efficiency
Controls the required efficiency ratio.
Minimum ATR Regime Ratio
Sets the lower volatility boundary.
Maximum ATR Regime Ratio
Sets the upper volatility boundary.
The default HTF layer uses previous completed higher-timeframe values.
float confirmedHTFClose = request.security(
syminfo.tickerid,
higherTimeframe,
close ,
gaps = barmerge.gaps_off,
lookahead = barmerge.lookahead_on
)
float confirmedHTFEMA = request.security(
syminfo.tickerid,
higherTimeframe,
ta.ema(close, higherTimeframeBiasLength) ,
gaps = barmerge.gaps_off,
lookahead = barmerge.lookahead_on
)
━━━━━━━━━━━━━━━━━━━━━━
📈 Trade Model
Enable Trade Model
Enables Entry, SL, TP, and lifecycle visualization.
Stop-Loss Mode
Selects Entry ATR Multiplier or Sweep Extreme + ATR Buffer.
Sweep-Extreme Buffer — ATR
Controls protective distance beyond the sweep extreme.
Entry ATR Stop Multiplier
Controls ATR stop distance from Entry.
Risk / Reward Target
Controls target distance from 0.25R to 15R.
TP / SL Same-Bar Priority
Selects Stop First or Target First.
Block Signals During Active Trade
Maintains the one-active-model structure.
Allow New Signal on Exit Bar
Controls same-bar reopening.
Show TP / SL Boxes
Shows or hides risk/reward areas.
Show Entry / TP / SL Lines
Shows or hides price-reference lines.
Show Historical Trades
Keeps completed TP models.
Maximum Historical Trades
Limits stored completed visuals.
Show TP / SL Result Labels
Controls TP HIT and CLOSED SL HIT labels.
━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert System
Enable Dynamic alert() Messages
Activates detailed runtime alerts.
Alert Final BUY / SELL Signals
Enables final-signal messages.
Dynamic Signal Alerts: A+ Only
Restricts dynamic signal messages to A+ setups.
Alert Trade Model Open
Sends Entry, SL, TP, RR, grade, and quality.
Alert TP / SL Result
Sends model-result messages.
━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Settings
Visual Profile
Selects Full, Clean, Minimal, or Mobile.
Level Display
Selects All Active, Armed + Events, Events Only, or Hidden.
Level Line Style
Selects Adaptive, Solid, Dashed, or Dotted.
Signal Label Style
Selects Full, Compact, or Icon.
Dashboard Mode
Selects Full, Compact, Trade Only, or Off.
Active Trade Zone Transparency
Controls TP / SL fill transparency.
Active Trade Border Transparency
Controls TP / SL borders.
Active Trade Line Width
Controls trade-line thickness.
Fade Completed Trades
Fades completed TP models.
Completed Trade Transparency
Controls historical fading.
Theme
Selects Crimson, Ice Blue, or Monochrome.
Show Swing-High Levels
Controls high-side levels.
Show Swing-Low Levels
Controls low-side levels.
Show Important Sweep Labels
Controls sweep-event labels.
Sweep Label Filter
Selects Important Only or All Valid.
Minimum Sweep Importance
Controls visible sweep quality.
Maximum Important Sweep Labels
Limits sweep-label history.
Show BUY / SELL Reclaim Signals
Controls final reclaim labels.
Maximum Reclaim Labels
Limits final signal-label history.
Fade Older Levels
Reduces old-level opacity.
Level Width
Controls swing-level line thickness.
Show Confirmed Pivot Markers
Controls pivot triangles.
Show Dashboard
Enables the dashboard.
━━━━━━━━━━━━━━━━━━━━━━
🛠️ Customization
Sweep Label Size
Controls SWEEP HIGH / SWEEP LOW labels.
Triangle Marker Size
Controls confirmed pivot triangles.
BUY / SELL Signal Label Size
Controls reclaim labels.
TP / SL Result Label Size
Controls result labels.
Dashboard Header Size
Controls dashboard titles.
Dashboard Text Size
Controls dashboard body text.
Color Mode
Selects Theme or Custom.
Custom color inputs control:
• swing-level states
• BUY / SELL backgrounds and text
• sweep-label backgrounds and text
• Entry, TP, and SL lines
• TP / SL fills and borders
• TP / SL result labels
• dashboard background, header, border, main text, and muted text
Input values and plotted marker values are hidden from the status line.
━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT MAKES THIS SCRIPT ORIGINAL
━━━━━━━━━━━━━━━━━━━━━━
Sweep Reclaim Entry Engine uses familiar analytical concepts such as:
• pivot highs and lows
• liquidity sweeps
• price reclaims
• ATR
• relative volume
• EMA bias
• market efficiency
• risk/reward projection
These concepts are not unique by themselves.
The originality of this script lies in how they are organized into one transparent sweep-reclaim workflow:
Confirmed pivot
→ separate high-side and low-side memories
→ ATR-normalized duplicate control
→ Fresh state
→ Armed state
→ penetration classification
→ minimum and maximum depth validation
→ Swept state
→ configurable reclaim window
→ close, location, body, and wick validation
→ eight-component quality score
→ A+ / A / B grade
→ multi-candidate comparison
→ cooldown, cluster, and conflict handling
→ chart and confirmed HTF EMA alignment
→ optional market-regime filtering
→ one-active-trade model
→ TP-specific historical preservation
→ SL-specific visual cleanup
→ static and dynamic alert delivery
→ bottom-right diagnostic dashboard
Distinctive implementation features include:
• separate lifecycle arrays for swing highs and swing lows
• a defined Armed state before sweep detection
• controlled minimum and maximum penetration depth
• wick/body sweep classification
• first-attempt retirement logic
• sweep-importance scoring separate from setup-quality scoring
• same-candle and multi-bar reclaim support
• transparent quality-component weighting
• Highest Quality and Nearest Level candidate selection
• multiple opposite-conflict resolution modes
• confirmed higher-timeframe EMA data
• ATR-normalized signal clustering
• full chart cleanup after SL
• independent sizing for every label and marker class
• status-line value suppression without hiding chart markers
• configurable targets up to 15R
The script is not a basic collection of unrelated filters.
Each module supports the same swing-sweep-reclaim process.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT PRACTICAL NOTES
━━━━━━━━━━━━━━━━━━━━━━
The indicator’s behavior depends heavily on settings and market conditions.
Signal frequency can change based on:
• Swing Mode
• pivot lengths
• maximum level age
• merge tolerance
• armed distance
• sweep penetration mode
• minimum and maximum sweep depth
• first-penetration logic
• multi-level selection
• reclaim window
• reclaim strength
• directional candle requirement
• same-candle wick requirement
• quality filter mode
• volume context
• direction restriction
• cooldown
• signal-cluster distance
• opposite-conflict mode
• chart EMA length
• HTF selection
• HTF EMA length
• market-condition filter
• volatility regime
• efficiency threshold
• active-trade restrictions
• symbol
• timeframe
• session
• data provider
• available chart history
A setting that appears selective on one market may behave differently on another.
Volume behavior can differ across forex, futures, equities, indices, and cryptocurrencies.
The higher-timeframe filter should use a timeframe meaningfully above the chart timeframe.
Structural mode confirms fewer and broader pivots than Reactive mode.
Strict reclaim and quality modes reduce signal frequency but do not guarantee better results.
Reactive or Balanced modes can increase frequency but can also increase chart noise.
Users should test the exact market, timeframe, session, and configuration they personally study.
━━━━━━━━━━━━━━━━━━━━━━
⚠️ LIMITATIONS AND SHORTCOMINGS
━━━━━━━━━━━━━━━━━━━━━━
This script has important limitations:
It does not guarantee profitable trades.
It does not predict future price movement.
It does not replace risk management.
It does not execute trades.
It does not place broker orders.
It does not include spread.
It does not include commissions.
It does not include slippage.
It does not include execution delay.
It does not include partial fills.
It uses bar-based OHLC data.
Same-candle TP / SL order cannot be known from standard OHLC bars.
Stop First and Target First are modeling assumptions.
Confirmed pivots require right-side bars before becoming available.
The quality score is not a win probability.
A+ is not a guaranteed outcome.
The dashboard is not TradingView Strategy Tester.
Internal model counters are not audited brokerage performance.
Historical boxes and labels do not guarantee future behavior.
Relative-volume quality depends on available volume data.
Higher-timeframe bias depends on the selected timeframe.
Market-efficiency filtering cannot identify every ranging condition.
ATR normalization does not make one configuration universal.
One-active-trade logic is a visual-management rule.
Data-feed differences can change historical pivots and signals.
Alert delivery depends on TradingView and user configuration.
Changing settings changes historical calculations.
Changing symbol, session, exchange, or timeframe changes the engine context.
For these reasons, Sweep Reclaim Entry Engine should be used as an educational decision-support and chart-analysis tool, not as a standalone automated strategy.
━━━━━━━━━━━━━━━━━━━━━━
👤 WHO THIS SCRIPT MAY BE USEFUL FOR
━━━━━━━━━━━━━━━━━━━━━━
This script may be useful for traders who:
• study liquidity sweeps
• monitor confirmed swing highs and lows
• distinguish a sweep from a reclaim
• prefer filtered signals instead of every wick event
• want a visible level lifecycle
• want ATR-normalized penetration thresholds
• want same-candle and multi-bar reclaim support
• want a transparent 0–100 quality framework
• want A+, A, and B setup grades
• want chart and confirmed HTF EMA context
• want optional market-regime filtering
• want Entry, SL, and TP visualization
• want one active model at a time
• want clean SL result handling
• want adjustable mobile and desktop presentation
• want alert-based monitoring
• want a structured educational analysis process
It may be less suitable for users who:
• want guaranteed buy/sell signals
• want a fully automated trading bot
• want every wick beyond every high or low
• expect the quality score to represent probability
• expect one configuration to work on every market
• require exact tick-level execution simulation
• expect displayed levels to match broker fills
• want an indicator to replace independent judgment
• expect alerts to execute orders automatically
━━━━━━━━━━━━━━━━━━━━━━
🧭 BEST PRACTICE SUGGESTIONS
━━━━━━━━━━━━━━━━━━━━━━
For a cleaner and more selective review:
• begin with Structural swing mode
• keep First Penetration Only enabled
• use Nearest Valid Level or Highest Quality according to preference
• keep Strict reclaim strength
• keep Strict quality filtering
• use Combined EMA bias
• select a valid higher timeframe
• use Same Direction cooldown
• keep the same-direction cluster filter enabled
• use Stop First for conservative same-candle modeling
• use Important Only sweep labels
• use Clean visual profile
• keep the dashboard in Compact or Full mode while learning
• use alerts for monitoring, not blind execution
For more active signal frequency:
• use Balanced or Reactive swing mode
• use Balanced reclaim strength
• use Balanced quality filtering
• reduce cooldown
• reduce minimum signal distance
• use Chart EMA or disable trend bias
• keep the hard market filter Off
• use All Valid sweep labels only when additional chart detail is useful
Always:
• review the structural level before the sweep
• confirm the reclaim candle has closed
• verify the setup fits personal market context
• compare the stop with nearby structure and volatility
• treat TP as a planning reference
• test the exact symbol and timeframe
• apply independent risk management and position sizing
━━━━━━━━━━━━━━━━━━━━━━
🔓 PUBLICATION NOTE
━━━━━━━━━━━━━━━━━━━━━━
Sweep Reclaim Entry Engine is published as an educational and visual market-analysis tool.
The purpose of this description is to explain:
• what the script does
• how swing points are confirmed
• how levels are stored and managed
• how Fresh, Armed, Swept, Reclaimed, and Consumed states work
• how penetration type is classified
• how minimum and maximum sweep depth work
• how reclaim timing works
• how reclaim strength is evaluated
• how the 0–100 quality score is calculated
• how A+, A, and B grades are assigned
• how candidates are selected
• how cooldown and clustering operate
• how opposite-direction conflicts are handled
• how chart and confirmed HTF bias work
• how market-condition filters operate
• how Entry and Stop Loss are calculated
• how the RR target is projected
• how one-active-trade logic works
• how same-candle ambiguity is handled
• how active and completed visuals behave
• how SL-specific cleanup works
• what the dashboard displays
• what static and dynamic alerts do
• what the timing limitations are
• what the script’s limitations are
• why the implementation is original
The script is designed to support structured analysis.
It does not promise profitable results.
It does not remove market risk.
It does not execute trades.
It should not be used as a blind buy/sell system.
MAIN CHART SCREENSHOT PLAN
Use one clean standard candlestick chart.
Show the indicator with its default settings.
The screenshot should contain:
• one clearly visible confirmed swing level
• one visible SWEEP HIGH or SWEEP LOW event
• one BUY RECLAIM or SELL RECLAIM label
• one active Entry / TP / SL model
• the thick white Entry line
• the blue/cyan TP area
• the red SL area
• the bottom-right dashboard
• the symbol and timeframe
• the indicator title in the status line
Do not include:
• other indicators
• manual drawings
• unrelated labels
• social links
• promotional text
• performance claims
• account-profit screenshots
• non-standard candles
• excessive zoom
• hidden price candles
The screenshot should demonstrate the script’s normal default behavior and make the swing, sweep, reclaim, risk model, and dashboard easy to understand.
━━━━━━━━━━━━━━━━━━━━━━
🛡️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━
Sweep Reclaim Entry Engine is provided for educational and informational purposes only.
It does not constitute financial, investment, trading, legal, or tax advice.
No indicator can guarantee future results.
Markets are uncertain, liquidity conditions change, volatility changes, and historical chart behavior does not ensure future performance.
Every user is responsible for their own:
• analysis
• validation
• risk management
• position sizing
• alert configuration
• trading decisions
• broker execution
• legal and tax obligations
The confirmed swing levels, lifecycle states, sweep labels, reclaim labels, quality scores, setup grades, bias states, market-condition states, Entry references, stop-loss levels, take-profit targets, TP / SL boxes, result labels, dashboard values, internal model counters, and alerts are visual analysis tools only.
The displayed Entry is not a guaranteed fill.
The displayed Stop Loss is not a broker order.
The displayed target is not a guaranteed objective.
The 0–100 quality score is not a win probability.
The A+, A, and B grades are not promises of performance.
The internal trade model does not include spread, commissions, slippage, latency, order-book conditions, or partial fills.
Use this script as a structured sweep-reclaim review and decision-support framework, not as a promise of profitability or a substitute for independent judgment.
Indicator

TELAY Algo AlphaTELAY Algo Alpha
A long-only trade map built on a directional trend model: one entry, a fixed stop, and three scaling targets — all confirmed on bar close.
Based on AlgoAlpha's open-source "Trend Targets". When price confirms an uptrend, the script marks a single long setup: entry at the flip, a fixed stop at low − ATR×5 (it does not trail, so normal pullbacks don't shake the trade out), and three targets registered by touch. Full carry; the position closes at the final target, or earlier on a close below the stop or a bearish flip.
A persistent panel keeps the setup visible through the whole uptrend — entry, stop, live return, the three targets with hit status, trend, and trade state — with a marker at each target. Signals confirm on bar close (no repaint); one position at a time.
Arabic UI — key: الدخول = Entry · الوقف = Stop · السعر/العائد = Price/Return · هدف 1/2/3 = Target 1/2/3 · الاتجاه = Trend (صاعد Up / هابط Down) · صفقة مفتوحة = Open · بلغ الهدف الأخير = Final target reached · ضرب الوقف = Stopped · مراقبة = Monitoring.
Credits: trend logic adapted from the open-source "Trend Targets" by AlgoAlpha. Management, stop, panel, and alerts are original. Published open-source.
For education and research only — not financial advice, and no result is guaranteed. Indicator

RIFTS Tap & Break Sniper [NICK789]
RIFTS Tap & Break Sniper
The RIFTS Tap & Break Sniper indicator is built around one core price-action idea:
Price creates or leaves behind a reaction zone, later returns to tap or reject from that zone, and then confirms direction by printing a BOS or CHoCH.
RIFTS stands for:
**R** — Reaction Zones
**I** — Imbalance Gaps
**F** — Flip / Structure Confirmation
**T** — Tap & Break Logic
**S** — Sniper Scoring
Together, these describe the full process used by the script: price creates or leaves behind a zone, returns to tap or reject from it, then confirms direction through BOS or CHoCH before the setup is scored and plotted as a Sniper or Sniper+ signal.
The script is designed to help traders identify tap-and-break structures where a zone reaction and a market-structure break occur together. Instead of showing zones by themselves or structure breaks by themselves, RIFTS connects both steps into one workflow:
1. Price creates a Reaction Block or Imbalance Gap.
2. Price returns to tap the zone.
3. Price rejects from the zone.
4. Price confirms direction with BOS or CHoCH.
5. The script scores the setup and plots a Sniper or Sniper+ signal.
🔶 USAGE
RIFTS identifies two main zone types:
Reaction Blocks
Imbalance Gaps
A setup begins when price creates one of these zones. The script then watches for price to return to the zone and either tap or reject from it.
A bullish setup develops when price interacts with a bullish zone and then confirms upward movement through a bullish structure break.
A bearish setup develops when price interacts with a bearish zone and then confirms downward movement through a bearish structure break.
The signal is not based on the zone alone. The main purpose is to find moments where zone interaction and structure confirmation align.
🔹 Reaction Blocks
Reaction Blocks are candle-based zones created after price displaces away from the previous candle.
A bullish Reaction Block forms when a bullish candle closes above the previous candle’s high while the previous candle was bearish.
A bearish Reaction Block forms when a bearish candle closes below the previous candle’s low while the previous candle was bullish.
The script marks the previous candle range as the reaction area. This area becomes important if price later returns to it and reacts.
The Zone Candle Body % setting controls how strong the displacement candle must be before a Reaction Block is created. Higher values require stronger candle bodies and reduce weaker zones.
🔹 Imbalance Gaps
Imbalance Gaps are created when price moves quickly and leaves an untraded gap between the current candle and the candle two bars back.
A bullish Imbalance Gap forms when the current low is above the high from two candles ago.
A bearish Imbalance Gap forms when the current high is below the low from two candles ago.
These gaps represent fast price movement. If price later returns to the gap, the script monitors whether price reacts from that area and then breaks structure.
🔹 Tap and Reaction Logic
After a Reaction Block or Imbalance Gap is created, the script tracks whether price comes back into the zone.
A zone is considered tapped when price trades back inside the zone.
A bullish reaction occurs when price taps a bullish zone and then closes upward out of that zone.
A bearish reaction occurs when price taps a bearish zone and then closes downward out of that zone.
The reaction candle must pass the selected quality filters:
Reject Body %
Reject Range ATR
These filters help avoid weak touches where price enters a zone but does not show enough rejection strength.
🔹 BOS and CHoCH Confirmation
The script tracks swing highs and swing lows using the Structure Swing Length setting.
When price closes above the last confirmed swing high, the script detects a bullish structure break.
When price closes below the last confirmed swing low, the script detects a bearish structure break.
The structure break is classified as either BOS or CHoCH.
BOS means Break of Structure. It represents continuation in the current structure direction.
CHoCH means Change of Character. It represents a break against the previous market bias and may suggest a possible directional shift.
CHoCH and BOS lines are drawn on the chart so users can see exactly which structure level was broken.
🔶 SIGNAL MODES
The Sniper Confirmation setting controls how strict the setup must be before a signal appears.
Reaction Only
A signal can appear when price reacts from a valid zone. This is the fastest mode because it does not require a BOS or CHoCH confirmation.
Tap + Structure
A signal requires price to tap a valid zone and then break structure in the signal direction.
Reaction + Structure
A signal requires both a valid zone reaction and a BOS or CHoCH confirmation. This mode is designed for traders who want zone rejection and structure confirmation together.
🔹 Structure Trigger Type
The Structure Trigger Type setting controls which structure events can trigger signals.
Both
Allows both BOS and CHoCH.
CHoCH Only
Only allows change-of-character signals.
BOS Only
Only allows break-of-structure signals.
This lets traders focus on reversal-style setups, continuation-style setups, or both.
🔶 SNIPER SCORE
Each setup receives a score based on the conditions that are present.
The score can include:
Zone tap or zone reaction
BOS or CHoCH confirmation
Fresh reaction timing
Optional volume confirmation
Optional EMA trend confirmation
A Sniper signal appears when the setup reaches the minimum score threshold.
A Sniper+ signal appears when the setup reaches the higher Sniper+ threshold.
The score is a confluence model. It does not predict guaranteed profit. It simply shows how many of the script’s conditions are aligned.
🔹 Volume Filter
When enabled, the Volume Filter requires current volume to be above a selected moving average multiplier.
Volume MA Length controls the volume average.
Volume Multiplier controls how much stronger current volume must be compared with the average.
This filter can help reduce signals during weaker volume conditions.
🔹 EMA Trend Filter
When enabled, the EMA Trend Filter checks whether price is on the correct side of the selected EMA.
Bullish signals require price to be above the EMA.
Bearish signals require price to be below the EMA.
This filter is optional and can be used when traders want signals to align with broader trend direction.
🔶 TRADE PLAN GUIDE
When a Sniper or Sniper+ signal appears, the script can draw a simple trade plan guide.
Entry is based on the signal candle close.
Stop loss is placed beyond the reaction zone with an optional ATR buffer.
TP1, TP2, and TP3 are calculated using the selected R multiples.
The trade plan is only a visual guide. It does not place trades, manage trades, or act as a strategy tester.
🔶 VISUAL DISPLAY
The script can display:
Bullish and bearish Reaction Blocks
Bullish and bearish Imbalance Gaps
CHoCH and BOS structure lines
Sniper and Sniper+ markers
Latest Entry / SL / TP guide
Master alert and separate bull/bear alert conditions
Used zones and overlapping same-side zones are visually cleaned up to keep the chart easier to read.
🔶 SETTINGS
Core Zones
Show Zones
Toggles the display of Reaction Blocks and Imbalance Gaps.
Reaction Blocks
Enables or disables Reaction Block detection.
Imbalance Gaps
Enables or disables Imbalance Gap detection.
Hide Broken Zones
Removes invalidated zones from the chart.
Max Stored Zones
Controls how many zones are stored and tracked.
Zone Candle Body %
Sets the minimum candle body percentage required to create a zone.
Sniper Logic
Sniper Confirmation
Chooses Reaction Only, Tap + Structure, or Reaction + Structure.
Structure Swing Length
Controls the swing pivot length used for BOS and CHoCH detection.
Structure Trigger Type
Chooses whether BOS, CHoCH, or both can trigger signals.
Reaction Valid Bars
Controls how long a zone reaction remains valid for confirmation.
Confirm Signal On Candle Close
When enabled, signals only appear after the candle closes.
Quality Filters
ATR Length
Controls the ATR used for rejection and stop-buffer calculations.
Reject Body %
Sets the minimum body size required for a valid rejection candle.
Reject Range ATR
Sets the minimum candle range relative to ATR for rejection quality.
Require Break Displacement
Requires BOS/CHoCH candles to pass body and ATR strength filters.
Break Body %
Sets the minimum body size required for a valid structure break.
Break Range ATR
Sets the minimum candle range relative to ATR for a valid structure break.
Score Filters
Use Volume Filter
Requires volume confirmation before allowing signals.
Volume MA Length
Controls the moving average used for volume comparison.
Volume Multiplier
Controls how strong current volume must be compared with its average.
Use EMA Trend Filter
Requires signals to align with the EMA trend filter.
EMA Trend Length
Controls the EMA used for trend filtering.
Show Sniper+ Only
Hides normal Sniper signals and only shows Sniper+ signals.
Min Sniper Score
Minimum score required for a normal Sniper signal.
Sniper+ Score
Minimum score required for a Sniper+ signal.
Visuals
Show CHoCH/BOS Lines
Toggles structure lines on the chart.
Max Structure Lines
Controls how many structure lines remain visible.
Show Latest Entry / SL / TP
Toggles the trade plan guide.
RR Lines Bars Ahead
Controls how far the trade plan guide extends to the right.
TP1 R, TP2 R, TP3 R
Controls the risk-multiple targets.
SL ATR Buffer
Adds an ATR-based buffer beyond the reaction zone for the stop guide.
Alerts
The script includes alert conditions for:
Master Sniper signal
Bull Sniper
Bear Sniper
Bull Sniper+
Bear Sniper+
A dynamic master alert option is also available for traders who want alert messages that include symbol, timeframe, close price, and score.
🔶 HOW TO READ THE SIGNALS
A bullish Sniper signal means price has interacted with a bullish zone and passed the selected confirmation rules.
A bearish Sniper signal means price has interacted with a bearish zone and passed the selected confirmation rules.
A Sniper+ signal means the setup reached the higher score threshold.
BOS labels can help identify continuation-style structure breaks.
CHoCH labels can help identify possible shift or reversal-style structure breaks.
The Entry / SL / TP guide is only for planning and should be adjusted to each trader’s own risk management.
🔶 IMPORTANT NOTES
This script is a confluence and visualization tool. It does not guarantee future price movement.
Signals are based on reaction zones, zone taps, rejection candles, and BOS/CHoCH structure breaks.
Swing structure requires confirmed pivots, so BOS and CHoCH lines appear only after the selected swing length confirms the structure point.
Lower timeframes may produce more frequent signals and more noise.
Higher timeframes may produce fewer but cleaner structure events.
Best results usually come from combining the script with higher timeframe context, market session awareness, and proper risk control.
Indicator

Rolling Dual Value AreaRolling Dual Value Area (68.2% / 95.4%)
WHAT IT DOES
Builds a rolling volume profile over a trailing window of the last N bars and
draws two nested value areas around the Point of Control (POC):
- Inner area: 68.2% of the window's volume by default
- Outer area: 95.4% of the window's volume by default
The POC is plotted as a single line; the inner and outer Value Area High/Low
boundaries are drawn as two nested bands. Because the profile is recomputed on
every bar, the POC, VAH and VAL appear as continuous trajectories rather than a
single static profile.
WHY 68.2% AND 95.4%
The conventional Market Profile value area uses 70%, which is a rounding of
68.2% - the share of a normal distribution within +/-1 standard deviation.
95.4% is the +/-2 standard deviation share. These two thresholds give a "1
sigma" inner zone and a "2 sigma" outer zone expressed as volume coverage. Both
are inputs, so you can set them back to 70/95 or to any values you prefer.
Important: this is a coverage-threshold band, not a parametric standard-
deviation band. It is centered on the mode (the POC) and expands toward the
heavier side, so it is generally asymmetric and reflects the actual shape of the
distribution. This is a different object from a VWAP standard-deviation band,
which is centered on the volume-weighted mean and is symmetric. The two coincide
only when the distribution is close to normal.
HOW IT IS CALCULATED
1. The high-low range of the last N bars is divided into equal price bins.
2. Each bar's volume is spread evenly across the bins its high-low range covers.
3. The bin with the most volume is the POC.
4. Starting from the POC, the area expands one bin at a time toward the adjacent
side holding more volume (classic asymmetric, greedy Market Profile
expansion). A single continuous expansion records the inner boundaries when
cumulative volume first reaches the inner target, then continues to the outer
target, so the outer area always contains the inner area and both follow one
expansion path.
Note: expansion advances one bin per step. The original CBOT method compares
pairs of bins per step; results are nearly identical and may differ by a bin in
edge cases. Because volume is added in discrete bins, the captured coverage
lands at or slightly above the chosen percentage.
HOW TO USE
- The bands mark where trading has concentrated over the lookback. Inner-band
edges often act as nearer support/resistance; the outer band marks
statistically extended zones.
- The POC is the heaviest-traded price in the window and tends to act as a
magnet.
- Watching Indicator

Cardwell RSI Trade Navigator [MarkitTick]💡 An advanced, multi-dimensional technical overlay designed to translate hidden momentum shifts into actionable, visually structured chart setups.
By extracting the core principles of Andrew Cardwell's methodology—which applies moving averages directly to the Relative Strength Index (RSI) rather than price—this tool identifies underlying momentum trends before they fully manifest in price action.
✨ Originality and Utility
Standard oscillators force traders to divert their attention away from price action to interpret lower-panel squiggles, which can often lead to a disconnect in charting focus.
This script is highly original because it extracts the mathematical cross of RSI-based moving averages and projects them directly onto the main price chart as a comprehensive, fully visualized trade management ecosystem.
It does not just paint a simple signal arrow; it algorithmically constructs a complete risk-to-reward framework the exact moment a momentum cross is mathematically validated.
By integrating directional filters like the ADX and higher timeframe (HTF) consensus protocols, it effectively filters out low-probability market chop.
The primary utility lies in its ability to automate the visual calculation of entry parameters, construct stop losses based on real-time volatility, and project multiple take-profit milestones based on strict multiples, essentially acting as a dynamic charting assistant built entirely on objective mathematical rules.
🔬 Methodology and Concepts
The core computational engine of this indicator relies on the calculation of a standard 14-period Relative Strength Index (RSI).
Instead of looking for traditional overbought or oversold reversal levels, the script calculates two Relative Moving Averages (RMA) of the RSI itself—a Fast RMA (9-period) and a Slow RMA (45-period).
A bullish bias is generated when the Fast RMA crosses above the Slow RMA, indicating that short-term momentum is accelerating faster than the baseline trend velocity.
Conversely, a bearish bias occurs when the Fast RMA crosses below the Slow RMA, signaling immediate downside momentum acceleration.
To ensure these momentum signals are not triggered in stagnant or mean-reverting markets, the script integrates an Average Directional Index (ADX) filter.
The ADX must register a value above a user-defined threshold (default 20) to mathematically confirm that the market is currently in a trending phase capable of sustaining the RSI momentum push.
Furthermore, a Higher Timeframe (HTF) filter requests the RSI RMA cross status from a macro timeframe. Signals on the current charting timeframe are only validated if they align perfectly with the HTF bias, ensuring that all setups are traded strictly in the direction of the dominant market flow.
Once all conditions of a valid signal are met, the script utilizes the Average True Range (ATR) to calculate a dynamic, volatility-adjusted Stop Loss, and then projects exact Take Profit targets using standardized Risk:Reward multipliers.
🎨 Visual Guide
The script transforms the standard candlestick chart into a highly visual, logically color-coded trade environment.
Candle Coloring: Candlesticks are dynamically colored based on underlying momentum strength. A visual gradient shifts from a neutral gray to a bright green (bullish) or bright red (bearish) depending directly on the separation distance between the Fast and Slow RSI RMAs.
HTF Trend Cloud: An optional visual cloud is plotted both above and below the price action. It is colored teal for HTF bullishness and crimson for HTF bearishness, offering traders macro context at a single glance without switching timeframes.
Trade Setup Lines: Upon a validated signal, dashed white horizontal lines appear on the chart, representing the exact calculated price levels for the Stop Loss, Entry point, Take Profit 1 (TP1), Take Profit 2 (TP2), and Take Profit 3 (TP3).
Risk Zones: The chart background between the entry price and the stop loss is shaded in a semi-transparent dark red. The zones between the entry and the consecutive take-profit levels are shaded in progressive green tones to visually represent risk versus reward areas.
Price Labels: Distinctive text labels featuring geometric icons are plotted dynamically at the end of the trade lines, displaying the exact numeric price coordinates for the Stop Loss, Entry, and all TPs.
Signal Strength Score Label: is a calculated metric designed to quantify the momentum and quality of the trade setup at the exact moment the signal is triggered. This value provides a "snapshot" of the signal's conviction level the moment it appears, whereas dashboard metrics track ongoing market conditions.
Dashboard Table: Located permanently in the top right corner, this dark-themed data table displays real-time metrics including the ticker symbol, current trend direction, current ATR value, a visual ADX strength bar, an overall signal strength percentage, the overarching HTF bias, and a counter tracking the number of bars since the last valid signal.
📖 How to Use
Traders can utilize this framework to efficiently identify and manage momentum-based trend continuation setups across any asset.
First, wait for a clear momentum shift, visually indicated by a change in the candlestick gradient color and the sudden appearance of the geometric trade setup zones.
Before considering the setup valid, reference the top-right dashboard table. Confirm that the ADX bar is registering sufficient trend strength and that the HTF Bias aligns with the direction of the signal.
Once the dashed white lines and colored risk zones appear, use the Entry line as the suggested area of execution.
The Stop Loss line provides a definitive, volatility-based invalidation point that should be respected.
As price moves in favor of the active setup, closely monitor the progression through the green reward zones.
If the "Breakeven on TP1" feature is enabled in the settings, observe the Stop Loss label automatically transitioning to a Breakeven line once the first target is struck, theoretically securing the position.
Finally, use the dynamic Risk:Reward live label attached to the current price action to actively monitor the floating R-multiple of the current signal.
⚙️ Inputs and Settings
RSI Length & RMA Lengths: Controls the core sensitivity of the underlying momentum engine. Lower values create more frequent signals, while higher values smooth the data for longer-term trend captures.
ATR Length & SL Multiplier: Defines the strictness of the stop loss protocol. A higher multiplier increases the breathing room for the trade but mathematically requires a larger price move to achieve a 1R target.
TP Risk:Reward Multipliers: Customizes the exact distance of the three take-profit targets relative to the initial ATR-based risk unit.
HTF Timeframe: Sets the macro timeframe used for the overarching trend consensus filter.
Choppiness / ADX Filter: Toggles the strict requirement for a minimum ADX threshold to validate signals, preventing entries in tight trading ranges.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Momentum Derivatives and Relative Strength
The foundational architecture of this script rests upon J. Welles Wilder Jr.'s Relative Strength Index (RSI), a momentum oscillator that measures the speed and change of price movements.
The mathematical formula bounds the output between absolute values of 0 and 100.
By taking a derivative of this oscillator—specifically applying Relative Moving Averages (RMAs, which are mathematically equivalent to Wilder's Smoothing method or an Exponential Moving Average with alpha = 1/length)—the script effectively isolates the velocity of the momentum itself.
The intersection of a fast-period RMA and a slow-period RMA of the RSI mathematically represents a point of momentum inflection, where short-term acceleration deviates significantly from the longer-term mean.
● Volatility-Normalized Risk Management
The utilization of the Average True Range (ATR) establishes a statistically sound, non-static risk framework.
ATR quantifies the historical volatility of an asset by calculating the greatest of the current high minus the current low, the absolute value of the current high minus the previous close, and the absolute value of the current low minus the previous close.
By multiplying the ATR by a specific scalar value, the script dynamically calculates a stop-loss distance that is statistically placed outside the normal noise distribution of the current market environment.
This approach is scientifically superior to static percentage-based stop losses, as it continuously adapts to the heteroskedasticity (changing variance) inherent in complex financial time series.
● Trend Directionality and Vector Strength
The Average Directional Index (ADX) component provides a purely quantitative measure of trend strength that is entirely independent of direction.
ADX is derived from the smoothed moving averages of the +DI and -DI, which measure the positive and negative directional movement vectors.
By requiring the ADX to breach a specific numerical threshold, the script mathematically filters out random walk (stochastic) market phases.
This ensures that the structural momentum setups only trigger when they occur within a statistically significant directional drift, massively increasing the probability of trend continuation.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Modern Adaptive Supertrend [GBB]Modern Adaptive Supertrend
Supertrend is probably the most copied trend indicator on TradingView. Most of the copies inherit the same handful of weaknesses so this is my attempt to fix the ones worth fixing, test the result properly, and be straight about the fix that didn't pan out.
If you have used the classic Supertrend you already know the idea. It is a volatility-based trailing line. It sits below price in an uptrend, above price in a downtrend, and it flips when price closes through it. Simple, fast to read, works on any chart. That simplicity is why it spread everywhere, and it is also where the trouble starts.
WHAT GOES WRONG WITH THE CLASSIC VERSION
Three things. The distance from price never adapts, so a clean trend and a sideways mess get treated exactly the same. The lookback never changes speed. And it flips on a single touch, so one wick through the line flips your bias and the next bar flips it back. That last one is the whipsaw everyone complains about. Run the classic as an always-in system on the 1h or below and in my testing it bleeds out. It only really holds up at 4h and above, where the trends are big enough to pay for all the flipping.
WHAT THIS VERSION DOES DIFFERENTLY
Two changes that work (and one that didn't but I left in place for you to experiment with)
The commit filter . This is the one that did the real work. Instead of flipping the moment price tags the line, price now has to close past it by a margin, about half an ATR by default, and optionally hold for a bar before the flip counts. That single change cut false flips by roughly 60% across the timeframes I tested. Same trend read, far less noise.
The adaptive distance . The band widens when the market is trending cleanly so it holds the move instead of shaking you out, and it also widens in chop, because a tight band in a range is a whipsaw machine. The only place it tightens is the transition, when a new move is just starting and you actually want it responsive. It judges trend versus chop against the market's own recent behaviour rather than a fixed threshold, because fixed thresholds do not travel well on crypto. I found that out the hard way.
The one that didn't work . I also built an adaptive lookback that was meant to let the indicator change speed with the market's rhythm. It added nothing. On crypto the rhythm turned out stable enough that adaptive just gave me a slower copy of the same line. It is still in the settings as an experimental toggle, switched off by default. Maybe you can find a tweak to make this feature work? If yes send me a DM :-)
One thing to be clear about before the settings. This is a trend filter, not a trading system. On raw direction it is right about 48% of the time, which is a coin flip, because Supertrend follows trend, it does not predict it. The value is in a cleaner trend read and lower drawdown, not in calling tops and bottoms. More on that at the bottom.
SETTINGS
Preset
Classic, Modern, or Custom. Classic is the textbook indicator, unchanged, so you can put it side by side. Modern is the default and what I recommend. It is timeframe aware: on 1h and below it runs both the adaptive distance and the commit filter, and above 1h it runs the commit filter only, because the adaptive distance did not add anything at higher timeframes in testing. Custom lets you toggle the layers yourself.
Commit filter (hysteresis)
- Commit buffer: how far past the line price has to close before a flip counts, measured in ATR. Default 0.5. Higher means fewer flips and slower turns.
- Persistence: how many closed bars the break has to hold before it flips. Default 1.
Adaptive distance (regime multiplier)
- Trend gain: how much wider the band gets in a clean trend. Default 0.8.
- Chop gain: how much wider it gets in a range. Default 0.5.
- Percentile window: how much recent history it uses to judge trend versus chop. Default 500 bars. Shorter reacts faster but is jumpier.
Adaptive period (experimental, off by default)
Turns on the adaptive lookback described above, with min and max clamps on the range. The defaults are in there, but as I said, it did not improve results. Leave it off unless you want to poke at it yourself.
Classic settings
ATR period and multiplier. Used by the Classic preset and as the base the other layers build on. Defaults 10 and 3.
Display
Direction-coloured line, an optional fill between price and the line, and flip markers. There is also an optional regime readout that shows whether the engine currently sees trend or chop. Off by default to keep the chart clean. Turn it on if you want to see what it is "thinking".
Alerts
Separate flip-up and flip-down conditions, plus an optional JSON payload if you want to wire it into a webhook.
HOW TO USE IT
As one input, not the whole decision. It answers a single question, which way is the trend leaning right now, with less noise than the classic gives you. It does not tell you where to enter or where price goes next. Use it to set your bias, then bring your own levels, structure, or entry trigger for the rest. Treating a trend filter as an entry system is how people lose money with a tool that is working exactly as designed.
Indicator

Indicator
