Daily Levels + Score# Daily Levels + Score (DHL×2)
---
## WHAT IT DOES
Most support/resistance scripts draw every level they find and leave you to guess which ones matter. DHL×2 finds the daily highs and lows that cluster together, draws them on your intraday chart, and then **grades each level with a statistical effectiveness score** based on how price actually reacted to it — evaluated strictly out-of-sample, so a level never "confirms itself". It also maps the current premium/discount context of the range with a time-at-price profile (POC / VAH / VAL).
## HOW IT WORKS
**1. Level detection — density clustering (KDE).**
Daily highs and lows over the lookback window are grouped with a kernel density estimate (triangular kernel, bandwidth = tolerance). Levels are the peaks of that density, so the result does not depend on the order in which candles are scanned, unlike the usual greedy grouping. Each touch is weighted by recency, and the final level is the weighted average of its touches. Tolerance adapts to volatility: Parkinson (default, converges faster after regime changes) or ATR.
**2. No self-confirmation bias.**
The touches that *form* a cluster do not count as tests. A cluster is "born" once it gathers the minimum number of touches; everything after that candle is out-of-sample evaluation. This is the key difference from scripts that count the same touches twice — once to build the level and again to "prove" it works.
**3. Effectiveness score.**
From its birth onward, every approach to the level is classified as respected or broken (consecutive candles in the zone count as one event). Three score modes:
- **Wilson 95%** — lower bound of the confidence interval; small samples are pushed toward 0 instead of showing a misleading "100% (2/2)".
- **Bayes (shrinkage)** — empirical Bayes: each level's score is pulled toward the base rate of all levels on the chart, with a configurable prior strength.
- **Raw %** — no correction, for comparison.
On top of that:
- **Time decay** — a respect from 30 days ago weighs less than yesterday's (configurable half-life).
- **Liquidity-consumption penalty** — consecutive respected tests progressively weaken the score, mimicking how resting orders get consumed at a real level.
- **Bounce magnitude (MFE)** — the average favorable excursion after each respect, expressed in daily-volatility multiples (σ), shown next to the score.
**4. Confluence.**
Round numbers (●, step configurable: e.g. 100 for NQ, 25 for ES) and proximity to the range equilibrium (◆) add a score bonus.
**5. Premium / Discount + time-at-price profile.**
The selected range (previous day, last N days, or full lookback) is split with fib lines (0 / 25 / 50 / 75 / 100) and an equilibrium line. A TPO-style **time-at-price profile** (no volume needed) is built from chart-resolution bars inside the range and plots the **POC, VAH and VAL**. When the POC sits meaningfully away from the geometric equilibrium (threshold as % of the range), the status label flags the imbalance with its direction: **POC>EQ** (p-shaped, value built in premium) or **POC Indicador

Judas Swing Detector [algotim]Judas Swing Detector is a session-based reversal indicator that models the institutional Judas Swing as a complete, sequential price event rather than a single false-breakout candle. Instead of flagging every session-open wick that reverses, the script requires a full chain of confirmed conditions — a locked Initial Range, a liquidity sweep beyond it, a rejection close back inside, an optional market structure shift, institutional-grade displacement, and higher-timeframe trend agreement — before a signal is ever scored, drawn, or alerted.
Problem Statement
A Judas Swing is commonly described as "price sweeps one side of the session open and reverses," but that description alone matches an enormous number of ordinary, low-quality wicks. Scripts that flag every such wick generate far more noise than usable signal, because a sweep and a close-back-inside is only the first half of the institutional sequence — it says nothing about whether the reversal has real structural or momentum support, or whether it agrees with the underlying daily trend.
This indicator addresses that gap by treating the Judas Swing as a seven-stage sequence and only surfacing a signal once every enabled stage has been satisfied on confirmed price data, with the overall setup then ranked by a disclosed, weighted confidence score.
Methodology
A session window (London Open, New York Open, or a fully custom session and timezone) drives an Initial Range engine that locks the session's high and low once a configurable opening window (5, 10, 15 or 30 minutes) elapses. The Initial Range is drawn as a transparent box and extends for the remainder of the session.
Once the Initial Range is locked, the script watches for a liquidity sweep: a wick that pierces beyond the Initial Range high or low by at least a minimum ATR-based distance, with the same candle closing back inside the range. This closing-back-inside requirement is what separates a genuine sweep-and-reject from an ordinary breakout continuation.
A confirmed sweep becomes a pending candidate. If Market Structure Confirmation is enabled, the candidate must be followed by a genuine structure shift measured against minor swing pivots that form strictly after the sweep bar: a higher high following a low-side sweep, or a lower low following a high-side sweep. Candidates that do not produce this structure shift within a configurable bar timeout are discarded with no signal created.
A qualifying candidate is then subjected to a Displacement Filter, requiring the confirming candle's body to reach a minimum ATR multiple, and an optional Higher Timeframe Bias check, requiring a fast/slow EMA relationship on a user-selected higher timeframe (e.g. 1H, 4H, Daily) to agree with the reversal direction. Only after every enabled stage passes does the script compute the Judas Confidence Filter score.
The Judas Confidence Filter combines five independently disclosed, user-weighted factors into a single 0-100 score: sweep depth (how far price pierced beyond the Initial Range in ATR units), displacement (the confirming candle's body size in ATR units), HTF agreement (the normalized separation between the fast and slow higher-timeframe EMA, reflecting how decisively the higher-timeframe trend supports the direction), rejection quality (where the sweep candle closed within its own range), and reversal aggression (how few bars elapsed between the sweep and structure confirmation). Weights are user-adjustable and auto-normalized. A signal is only plotted and only triggers alerts if its score meets the Minimum Confidence Score threshold — this is a genuine filtering mechanism that changes what is drawn, not a cosmetic label applied afterward.
Confirmed signals optionally draw an Entry Zone between the 50% and 62% retracement of the confirming displacement candle, reflecting where institutional-style retracement entries are commonly sought after a confirmed reversal, along with a stop-reference line at the sweep extreme. Both extend forward and are visually dimmed once price closes back through the sweep extreme, marking the setup invalidated.
Signal Workflow
Step 1 — the selected session opens and the Initial Range begins building from the session's first 5-30 minutes of price action.
Step 2 — the Initial Range locks; the script now watches for a liquidity sweep beyond either side of that locked range.
Step 3 — a wick pierces beyond the range by a minimum ATR distance and the same candle closes back inside, registering a pending sweep candidate.
Step 4 — if enabled, the candidate must be followed by a market structure shift measured against post-sweep swing pivots, within a bounded bar timeout.
Step 5 — the confirming candle must clear the ATR-based displacement threshold, and if enabled, the higher-timeframe EMA bias must agree with the reversal direction.
Step 6 — the completed sequence is scored by the Judas Confidence Filter across five weighted factors; only scores at or above the minimum threshold are plotted and alerted.
Step 7 — an optional 50%-62% entry zone and stop-reference line are drawn from the confirming candle and remain active until price closes back through the original sweep extreme.
Why This Indicator Is Different
Most public "Judas Swing" or session-sweep scripts fire on the sweep-and-close-back-inside event alone, with no structural or momentum confirmation and no higher-timeframe context.
This script models the full institutional sequence explicitly — session, Initial Range, sweep, rejection, structure shift, displacement, HTF agreement — and only creates a signal after every enabled stage resolves in order on confirmed bar closes.
The Judas Confidence Filter converts five independently disclosed factors, including reversal aggression measured in bars-to-confirmation and rejection quality measured from close position within the sweep candle's own range, into a single adjustable score rather than a binary flag.
Confidence weighting is fully exposed, letting the ranking be tuned toward sweep depth, displacement strength, higher-timeframe agreement, rejection quality, or reversal speed depending on the trader's approach.
The optional 50%-62% Entry Zone models a specific, disclosed institutional retracement convention rather than simply marking the signal bar.
Inputs
Session Engine
Session (London Open / New York Open / Custom)
Custom Session Window
Session Timezone
Initial Range
Initial Range Duration (5/10/15/30 minutes)
Show Initial Range Box
Liquidity Sweep Detection
Minimum Sweep Pierce (x ATR)
Market Structure Confirmation
Require MSS Confirmation
MSS Pivot Length
MSS Timeout (bars)
Displacement Filter
Displacement Threshold (x ATR)
ATR Length
Higher Timeframe Bias
Require HTF Bias Agreement
HTF Timeframe
HTF Fast/Slow EMA Length
Judas Confidence Filter
Minimum Confidence Score
High-Confidence Threshold
Advanced weight sliders for sweep depth, displacement, HTF agreement, rejection quality, and reversal aggression
Entry Zone
Show Entry Zone (50%-62% Retracement)
Entry Zone Extension (bars)
Visual Settings
Show Sweep Markers / Confirmation Arrows / Stop Marker
Label Size
Bullish/Bearish/Initial Range/Elite Score Colors
Status Panel
Show Status Panel
Panel Position
Alerts
Alerts are available for:
Session Started
Liquidity Sweep detected
Bullish Judas Swing confirmed
Bearish Judas Swing confirmed
High-Confidence Judas Swing (Elite grade)
Higher-Timeframe Bias Change
Entry Zone Reached
Practical Usage
Use the status panel's HTF Bias reading as directional context before evaluating an individual Judas signal.
Treat a High-Confidence (Elite) signal as a materially stronger setup than one that merely clears the minimum threshold, since it reflects agreement across all five scored factors rather than a narrow pass.
Raise the Minimum Confidence Score on lower timeframes or noisy instruments to reduce the number of marginal signals generated.
Disable Require MSS Confirmation only if you specifically want to evaluate the sweep-and-rejection event on its own, understanding this removes one of the seven confirming stages.
Combine the alert feed with a broader trade plan, since each alert marks a structural event, not an execution signal.
Limitations
The Initial Range and session logic depend on the chart's intrabar data matching the selected session window; behavior on markets with irregular or 24-hour sessions may differ from traditional FX/futures sessions.
Market structure confirmation depends on minor swing pivots, which require bars to form on both sides before they confirm, introducing an inherent, bounded delay.
Confidence scoring is a relative, disclosed ranking and does not predict the outcome of any individual signal.
The higher-timeframe bias is read via a standard non-repainting security call and reflects EMA relationship only; it is not an independent trend-strength model.
As with any structure-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a session and structure analysis tool intended to organize and score the Judas Swing sequence through a disclosed, multi-stage validation process.
All session state, sweep detection, structure confirmation, displacement, and scoring are evaluated on confirmed bar closes only, so no element of the script repaints once drawn.
The output is intended to support structural analysis and is not a standalone buy or sell recommendation. Indicador

Breaker Block Identifier [algotim]Breaker Block Identifier is a market structure indicator that converts failed order block retests into scored, non-repainting breaker zones. Rather than flagging every order block that gets invalidated, the script requires a complete sequence of confirmed price events — order block formation, an opposing structure break, a retracement into the invalidated zone, and a failed retest of that zone — before a breaker is created, and then ranks the result with a transparent quality score.
Problem Statement
Order blocks are frequently invalidated by a structure break and later retested, but a retest failing to continue in the original direction is not automatically a tradable breaker block. Many public scripts draw a zone as soon as an order block is broken, without verifying that the subsequent retest actually failed, how deep that retest penetrated, or how convincingly price rejected the zone. This produces a high volume of low-quality zones that require manual filtering by the trader.
This indicator addresses that gap by treating breaker formation as a multi-stage state machine rather than a single condition, and by scoring every candidate that completes the sequence so weak retests can be filtered out programmatically instead of visually.
Methodology
Swing highs and lows are identified with ta.pivothigh/ta.pivotlow using a user-defined bar count on each side, so every structural level referenced by the script is a confirmed pivot, never a forming one.
An order block source candle is located as the last opposite-colored candle at or immediately before each confirmed swing pivot, within a fixed lookback. The candle must exceed a minimum size expressed as a multiple of ATR, and can optionally be required to close on above-average volume. Zone boundaries can be set to the candle body (open/close) or the full wick range (high/low).
Every order block candidate then moves through three internal states. In the Pending state the script waits for an opposing structure break (a close beyond the relevant swing high or low, optionally required to clear the level by a minimum ATR multiple). Once that break occurs the candidate becomes Flipped, and the script waits for price to retrace back into the now-invalidated zone. On entry into the zone the candidate becomes Retesting, and the script tracks the deepest penetration price reaches inside the zone on a bar-by-bar basis.
A Retesting candidate resolves in one of two ways. If price closes back through the zone in its original direction by the confirmation displacement threshold, the retest is judged to have held and the candidate is discarded with no breaker created. If price instead closes through the opposite edge of the zone by the same displacement threshold, and the tracked penetration depth met a minimum percentage of the zone's height (the Retest Qualification Filter), the retest is judged to have failed and the order block is converted into a breaker in the opposite direction of its original bias.
Each confirmed breaker is then scored from 0 to 100 using six independent, user-weighted factors: the displacement strength of the invalidating structure break, the ATR-relative size of the original order block candle, how closely the retest penetration matched a user-defined ideal depth (scored on a curve, so both shallow touches and near-total breaches score lower than a clean mid-zone tag), the wick-rejection ratio of the confirming candle, how quickly the retest resolved relative to the retest window, and the ATR-normalized distance price traveled before returning to retest. The six sub-scores are combined using auto-normalized weights, so a breaker only appears on the chart, gets drawn, and triggers alerts if it clears the configured minimum quality threshold.
Confirmed breakers remain in an Active/Touched state until price closes through the far edge of the zone by the invalidation displacement threshold, at which point the zone is marked invalidated, visually dimmed, and removed after a configurable linger period. A hard maximum-age limit and a per-direction cap on active zone count prevent unbounded object growth.
Signal Workflow
Step 1 — a confirmed swing pivot forms and an order block candidate is registered from the qualifying source candle behind it.
Step 2 — the candidate waits in a Pending state until an opposing structure break (BOS/CHoCH) closes beyond the originating swing level.
Step 3 — once flipped, the candidate waits for price to re-enter the invalidated zone, entering the Retesting state and tracking maximum penetration depth.
Step 4 — the retest resolves: a displacement close back through the zone in the original direction discards the candidate, while a displacement close through the opposite edge with sufficient penetration confirms a breaker.
Step 5 — the confirmed breaker is scored across six weighted factors and only drawn, labeled, and alerted on if it meets the minimum quality threshold.
Step 6 — the active breaker zone extends forward until price closes through its far edge by the invalidation displacement threshold, at which point it dims and is scheduled for removal.
Why This Indicator Is Different
Most public order block or breaker scripts draw a zone the moment an order block is invalidated by a structure break, without separately validating whether the ensuing retest actually failed.
This script models breaker formation as an explicit four-state pipeline (source candle, pending, flipped, retesting) and only creates a zone after the retest resolves against its original direction with a minimum measured penetration depth.
The Breaker Quality Score converts six independently disclosed factors, including retest penetration depth scored on a curve around a configurable ideal value rather than a simple threshold, into a single adjustable ranking rather than a cosmetic label.
Quality-score weighting is fully exposed, allowing the ranking to be tuned toward structure strength, retest precision, wick rejection, confirmation speed, or impulse distance depending on the trader's approach.
Zone fill transparency scales with the quality score, so higher-ranked breakers render more opaque and lower-ranked ones fade into the background without adding separate visual elements.
An optional formation preview renders the retest phase of a candidate before it resolves, giving visibility into why a breaker did or did not form without permanently cluttering the chart.
Inputs
Structure Settings
Swing Pivot Length
Displacement Filter on Structure Break
Structure Break Displacement (x ATR)
ATR Length
Order Block Detection
Use Candle Body for Zone Boundaries
Min Order Block Size (x ATR)
Candidate Expiry (bars)
Volume Confirmation Filter
Volume MA Length
Volume Multiplier Threshold
Breaker Conversion Rules
Retest Window (bars)
Confirmation Displacement (x ATR)
Min Retest Penetration (%)
Quality Score
Filter Breakers by Quality Score
Minimum Quality Score
Ideal Retest Penetration Ratio
Advanced weight sliders for structure break strength, impulse size, retest precision, wick rejection, confirmation speed, and distance traveled
Visual Settings
Bullish/Bearish Breaker Colors
Min/Max Fill Transparency
Show Zone Midline
Show Quality Label
Label Size
Formation Preview toggle and color
Lifecycle & Cleanup
Max Active Breakers (per side)
Invalidation Displacement (x ATR)
Invalidated Linger (bars)
Max Breaker Age (bars)
Info Panel
Show Info Panel
Panel Position
Alerts
Alerts are available for:
Bullish Breaker Block formed
Bearish Breaker Block formed
Structure confirmation on breaker conversion
Price entering an active breaker zone
Breaker invalidated
Practical Usage
Use the info panel's structure bias reading as directional context before evaluating individual breaker zones.
Treat a fresh, high-quality breaker aligned with the prevailing structure bias as a potential continuation zone rather than a standalone entry signal.
Raise the minimum quality threshold on lower timeframes or noisy instruments to reduce the number of marginal zones drawn.
Use the retest penetration and displacement settings together to control how strict the failed-retest qualification is for your instrument and timeframe.
Combine the alert feed with a broader trade plan, since each alert marks a structural event, not an execution signal.
Limitations
Swing pivots require bars to form on both sides before they confirm, so structure breaks and order block placement are inherently delayed by the swing pivot length.
The order block source candle is located within a fixed lookback behind each pivot; if no qualifying candle exists in that window, no candidate is created for that pivot.
Quality scoring is a relative ranking based on disclosed, adjustable factors and does not predict the outcome of any individual breaker zone.
Volume-based filtering depends on the data provider's reported volume and may behave inconsistently on instruments with limited or unreliable volume data.
As with any structure-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a market structure analysis tool intended to organize and rank breaker block formation through a disclosed, multi-stage validation process.
All structure breaks, state transitions, breaker confirmations, and invalidations are evaluated on confirmed bar closes only, so no element of the script repaints once drawn.
The output is intended to support structural analysis and is not a standalone buy or sell recommendation. Indicador

MTF Stochastic Phase Fusion [FibonacciFlux]Six Stochastic timeframes fused into a tactical and a structural wave, with a decaying pulse on their crossings - published with a re-run of the backtest the pulse is built on, which finds no edge, a move that is over before the marker prints, and a holdout that was searched.
WHAT IT DRAWS
Stochastic %K is computed inside each of six timeframes (15m, 1H, 4H, 1D, 1W, 1M). Four of them are weighted into a tactical wave, three into a structural wave, and the spread between the two is the thing the indicator is about. A phase-plane term treats centred %K as a real axis and scaled %K velocity as a quadrature axis; the length of the weighted unit-vector sum becomes the tactical coherence area behind the waves. On the price pane, a golden or dead cross of tactical over structural drops a GC or DC label with a Type letter, and that pulse decays over a symbol-specific life - 120 minutes on BTC, 60 on ETH - fading out as it expires. If the adverse excursion since the cross passes a threshold, a TAIL marker appears.
THE PULSE'S EVIDENCE, RE-RUN
This is the first script I have published where the original backtest could actually be repeated. It was run on BTCUSDT and ETHUSDT 15m, train 2024-07 to 2025-12 and a one-shot holdout 2026-01 to 2026-07, and Binance serves that whole span, so it was re-run on 84,426 bars per symbol rather than taken on trust. Four things came out, and none of them supports the claim.
NO EDGE SURVIVES A PROPER NULL
Across 236 (cell, statistic, threshold) tests on two instruments and two chart timeframes, against a circular-shift null of 200 to 400 draws, ZERO reach p <= 0.05 - where about 12 would be expected by chance alone. The median p is 0.632. Nothing passes a multiple-testing correction because nothing passes without one.
The single result that once looked significant, a BTCUSDT mean of +4.98bp at p = 0.049, was a draw-count artifact. At 40 draws the achievable p values are multiples of 1/41, so 0.049 is literally one draw away from nothing; re-run at 1000 draws under three seeds the same test gives 0.055, 0.069 and 0.065, and it vanishes at every neighbouring horizon.
THE MOVE IS OVER BEFORE THE MARKER PRINTS
This is the part that replicates in every cell tested, and it is the honest description of the thing. Measuring the same horizon ending at the cross against the one starting at it:
BTCUSDT golden +31.03bp before +4.09bp after 88.4% already spent
BTCUSDT dead +29.80bp before -1.73bp after 94.5% already spent
ETHUSDT golden +36.72bp before -2.02bp after 94.8% already spent
ETHUSDT dead +44.40bp before -2.34bp after 95.0% already spent
Between 88% and 95% of the round trip associated with a crossing has already happened when the marker appears. Note the dead crosses too: on both symbols price has risen roughly 30 to 44bp into a dead cross. That is what a crossover of two smoothed multi-timeframe stochastics does - it reports, it does not anticipate.
THE HOLDOUT WAS SEARCHED
The quoted "~58% holdout win rate" is 54.63% in the shipped configuration. 58% appears only as one cell of a 56-cell grid of pulse life against coherence gate, evaluated on the holdout itself, whose maximum is 77.42%. A holdout you search is a second training set, and that is the finding most damaging to the original methodology - more so than any single number in it.
Two related corrections. The header said the losing side's adverse excursion grew from about 0.7% to about 1.1%; measured it goes 0.668% to 0.773%. And it said the holdout mean "flipped negative"; in the shipped configuration the BTCUSDT holdout mean is +3.72bp, positive.
THE PULSE-LIFE DEFAULTS ARE NOT MEASURED OPTIMA
The 60-minute ETH pulse life returns -1.58bp at exactly that horizon - a loss - ranking fifth of the ten horizons swept in its own cell, where the best is +6.91bp at 480 minutes. The 120-minute BTC life ranks fourth of ten. And which horizon looks best is uncorrelated between the two symbols, Spearman -0.03, so the horizon profile describes this sample rather than the indicator. Both defaults are kept so the chart matches the research it came from, and both tooltips now say this.
WHAT ABOUT THE TAIL MARKER
It is a description of drawdown that has already happened, not a warning about drawdown to come. TAIL-flagged pulses average -140.32bp, and randomly placed pulses carrying the same flag average -144.04bp, p = 0.634. Conditioning on a large adverse excursion selects losing trades by arithmetic; the flag adds nothing. Worse for the threshold's stated justification, on BTCUSDT - the instrument it was calibrated from - real pulses have a THINNER left tail than the null at every level tested.
WHAT THE PULSE ACTUALLY DOES ON A CHART
Over 84,155 scored bars of BTCUSDT 15m at the shipped defaults there are 639 golden and 638 dead crosses. A long pulse is running on 5.1% of bars and a short pulse on 5.1%, so some pulse is live on 8.1% of bars - and on 2.1% of bars a long pulse and a short pulse are running at the same time, because they are independent state machines and neither cancels the other. ETHUSDT gives 821 and 820 crosses, 6.3% pulse-active, 0.9% overlapping. The TAIL state, the one the header calls the failure mode, is on for 0.2% of bars on BTCUSDT and 0.1% on ETHUSDT.
The alert floor of 65 on tactical coherence is not a tight filter: coherence sits above it on 31.7% of BTCUSDT bars and 29.2% of ETHUSDT bars, with a median of 49.2 and 47.7 respectively.
WHAT CHANGED IN THIS VERSION
The largest dead-code removal in this series of publications, none of which touches a plotted value.
A settings toggle promised a "state table" that did not exist anywhere in the file - no table, no cell - and the three helper functions written for it were the last three lines of the script. Gone.
Every %D value was unused. Both state functions returned a %D line, all twelve request.security calls carried it, and not one of the twelve was ever read. That made the "%D smoothing" input completely inert: swept from 1 to 30 across 420,775 bar comparisons on two symbols it changed no plotted series by any amount at all and left the pulse count identical. The input and the twelve unread series are gone, which also takes a third series off each of twelve higher-timeframe requests.
Three more computed-and-never-used values went with them: the structural coherence, the wave spread, and the maximum favourable excursion tracked for both pulse sides. Maximum ADVERSE excursion stays, because the caution and TAIL states read it.
The Type A to B upgrade markers and their two alerts are gone, because they cannot fire. An upgrade needs the structural wave to cross 50 while a pulse is still alive - but the structural wave is built from 1D, 1W and 1M legs and a pulse lives eight bars on BTC or four on ETH, so its median change over an entire pulse life is exactly 0.000 on both symbols. Measured: 0 upgrades in 1,070 BTCUSDT pulses, of which 546 started as Type A, and 1 upgrade in 1,518 ETHUSDT pulses. Two plotshapes, two alert conditions and a documented taxonomy for an event that fires once in 2,588 pulses. The Type letter on the GC/DC label is reachable and stays.
The HTF data mode defaulted to "Developing HTF", the repainting one. With six requested timeframes reaching up to 1M, an open monthly bar keeps moving the structural wave for weeks. The default is Confirmed only now, and the tooltip says the word repaints. One thing worth knowing: on historical bars the two modes differ only in the 15m leg, because that is the chart timeframe - the higher-timeframe legs resolve to the same completed bar either way.
924 box-drawing characters, a Unicode minus and three arrow glyphs became ASCII, an MPL header was added, and the title dropped its version suffix for the handle.
WHAT THE MEASUREMENTS COVER
BTCUSDT and ETHUSDT 15m from Binance, 2024-04 to 2026-08, 84,426 bars per symbol, which spans the original train and holdout windows entirely. No other instrument, no other timeframe, no transaction costs. The pulse-life defaults of 120 and 60 minutes came from the original screen; the 90-minute fallback for every other symbol did not, and its tooltip says so.
One warm-up note that bites on real charts: the structural wave needs 16 monthly bars before it exists, so this indicator plots nothing at all on any symbol with less than about sixteen months of monthly history, however much intraday history the chart has.
HOW THE NUMBERS WERE CHECKED
The whole computation was reimplemented outside Pine and cross-checked against this chart's Data Window: 24 quantities on 10 bars, 240 values - both waves, tactical coherence, all six raw sensors, three velocities, both cross flags, both pulse-active flags, both adverse-excursion trackers and both decay intensities. The captured bars include a golden cross, a dead cross and several bars inside a live pulse, so the pulse state machine and the MAE tracking were exercised rather than assumed. All 240 values round to the exact two decimals TradingView prints, worst raw difference 4.9e-3.
That check earned its keep. A first version of the reimplementation was wrong in a way that is invisible almost everywhere: a higher-timeframe request updates on the chart bar that closes WITH the higher-timeframe bar, not one period later. Using "always the previous closed bar" is correct on three of every four 15-minute bars against a 1H leg and wrong on the fourth. It produced a 9.09-point error on the 1H sensor at 22:45 and exactly zero error at 22:30, and only the live comparison caught it.
Open source under MPL 2.0. Nothing here is a forecast, a signal service, or a claim of profitability. Indicador

AntiVestor - Top 'n Tail ZonesAntiVestor - Top 'n Tail Zones
Top 'n Tail Zones is a utility for marking fixed levels and shaded zones on any chart or pane that moves on a stable numeric scale — market breadth readings, percentage-above-moving-average lines, or any bounded oscillator. It tops and tails the range: an upper extreme zone, a lower extreme zone, and a neutral middle, all set by you.
You pick a scale preset or enter the levels yourself; it paints the zones, three reference lines and four labels, and holds them across the chart.
It calculates nothing. There is no signal, no reading of price, no alert. Every level on screen is a number you chose.
WHAT IT DRAWS
An upper zone, bounded by two levels. Labelled "Bullish Extreme" by default.
A lower zone, labelled "Bearish Extreme".
A middle zone between an upper and lower boundary, labelled as the neutral or chop area. If you set its upper and lower bounds to the same number, it collapses to a single midpoint line rather than a zero-height box.
Dashed reference lines at the middle-zone boundaries, and an optional solid line at zero.
Four labels floating to the right of the last bar, so the zones stay identified when you are scrolled in.
All levels and all six colours are adjustable. The zones extend back to the first loaded bar and forward by a configurable number of bars.
WHAT IT IS FOR
Anything that oscillates inside a range you already know the shape of:
Market breadth symbols such as advance-decline differences, where the useful information is how far into an extreme the reading has gone rather than the number itself.
Percentage-of-stocks-above-moving-average readings, which live on a 0-100 scale where the top and bottom bands are the interesting parts.
Any bounded oscillator, where you want a shaded band rather than a pair of thin lines.
The intended pattern is a top zone, a bottom zone and a neutral middle, so that a glance tells you which part of the range you are in.
HOW TO APPLY IT
Two routes, depending on what you are zoning.
1. Chart the instrument directly and add the script. It draws on that instrument's own scale.
2. Add the script, then drag it into the pane of the oscillator you want to zone. It picks up that pane's scale.
Then pick a preset.
ADD / Breadth sets levels suited to an advance-decline reading in the low thousands.
Percentage (0-100) sets the top and bottom tenth as the extreme zones and marks 50 as the midpoint — for percentage-above-moving-average readings and bounded oscillators.
Custom hands control to the six level inputs, which is where you go for any scale the two presets do not fit.
A NOTE ON THE DEFAULT COLOURS
The upper zone defaults to red and the lower to green, which is the opposite of what you might expect. That is deliberate: on a mean-reversion scale the top of the range is where you become cautious, not enthusiastic. If you read the scale the other way, both are colour inputs.
LIMITATIONS
Nothing here adapts. The presets are fixed sets of numbers and the custom levels are static. Nothing recalculates, rescales or follows the instrument — change scale and you change the preset or re-enter the levels yourself.
Zones begin at the first bar loaded in your chart's history, not at the true start of the instrument.
The zone labels are fixed text. "Bullish Extreme" and "Bearish Extreme" will not match every scale you might apply this to.
No alerts, no signals, no directional output of any kind. Because nothing is computed from price, nothing repaints, but equally nothing is confirmed either.
On a standard price chart the preset levels are far from price and the zones will be invisible. That is expected — switch to Custom and enter levels that suit the instrument.
This is a drawing utility, not an analysis tool. It does not tell you anything you did not already decide. Nothing here is financial advice. Indicador

STOC - Moving Average Trend & SignalsSTOC – Moving Average Trend & Signals is a trend-following indicator designed to simplify moving-average analysis using four widely followed averages:
• 10 EMA – Short-term momentum
• 20 EMA – Short/intermediate trend
• 50 SMA – Intermediate trend
• 200 SMA – Long-term market structure
The indicator combines price position, moving-average direction and MA alignment to identify potential entries, exits and broader trend conditions.
SIGNAL MODES
1. MA Stack
A Buy signal occurs when the averages newly align in bullish order:
10 EMA > 20 EMA > 50 SMA > 200 SMA
The standard exit occurs when this bullish alignment breaks.
2. Price vs MA
A Buy signal occurs when price crosses above the selected signal MA. The standard exit occurs when price crosses below it.
The selectable signal averages are:
• 10 EMA
• 20 EMA
• 50 SMA
• 200 SMA
3. Fast/Slow Crossover
A Buy signal occurs when the 10 EMA crosses above the 20 EMA. The standard exit occurs when the 10 EMA crosses below the 20 EMA.
EXIT METHODS
1. MA Signal Exit
Uses the corresponding exit condition of the selected signal mode.
2. ATR Trailing Exit
Replaces the standard MA exit with a volatility-adjusted trailing stop. The ATR stop follows the highest price reached after entry and never moves downward during an active trade.
The ATR exit is confirmed only when a candle closes below the trailing stop. Intrabar touches do not trigger an exit.
OPTIONAL FILTERS
• Moving-average slope confirmation
• Volume confirmation
• Minimum separation between the 10 EMA and 200 SMA
• Bar-close signal confirmation
• Flat or choppy market filter
DASHBOARD
The high-contrast dashboard is designed to remain visible on both light and dark chart themes. It displays:
• Current market trend
• Moving-average alignment
• Selected signal MA
• Price position
• MA direction
• Active exit method
• Current ATR stop
• Volume-filter status
• Current trade status
VISUAL FEATURES
• Individually configurable moving-average plots
• Buy and Exit labels
• Bullish and bearish trend backgrounds
• Optional ATR trailing-stop line
• Adjustable dashboard position and size
ALERTS
Alert conditions are included for:
• Buy signals
• All exit signals
• MA-based exits
• ATR trailing exits
• Beginning of a strong uptrend
• Beginning of a strong downtrend
For more reliable live alerts, keep “Confirm Signals on Bar Close” enabled and select “Once Per Bar Close” when creating the TradingView alert.
SUGGESTED USE
The indicator can be used across stocks, indices, futures, forex and cryptocurrencies. Higher timeframes such as 4-hour, daily and weekly charts generally provide cleaner trend signals, while lower timeframes may generate more frequent signals and market noise.
This indicator is a trend-following decision-support tool. It does not predict future prices or guarantee profitable trades. Signals should be combined with appropriate position sizing, risk management, support and resistance analysis, and independent market evaluation. Indicador

Pivot Channel Breakouts█ OVERVIEW
Pivot Channel Breakouts is an adaptive market-structure indicator. It automatically builds a sloped channel from confirmed High and Low pivots, checks the geometry of the formation, and marks a breakout only when the close moves beyond the channel by a minimum ATR margin.
After a breakout the channel is moved into history, and an optional TP/SL module draws Entry, Stop Loss and up to three Risk:Reward targets. The indicator can be used both to read structure and to plan a potential trade after the breakout.
█ CONCEPTS
The indicator automatically detects pivots and builds the widest possible price channel that still contains all remaining points and candle closes. The goal is to recognize channel formations quickly without drawing the lines by hand.
Pivot-Based Channel Structure
The channel has two independent boundaries:
- Resistance — the upper line from High pivots.
- Support — the lower line from Low pivots.
The channel is drawn only when both sides of the buffer hold the required number of pivots. With the default setting that means at least two High pivots and two Low pivots. Until one side is incomplete, no formation is created.
Each boundary needs at least two pivots. With more points the indicator does not require collinearity. It searches pairs and keeps the pair with the greatest span, provided the remaining pivots and the candle closes stay on the correct side of the line. The first two pivots of the formation must be opposite — one High and one Low — so the channel starts from an alternating structure rather than two extremes of the same side. Envelope fit describes the price structure, not a perfect straight line through every point.
Pivot Detection
Pivot Left is the number of bars before the extreme, Pivot Right is the number of bars after it required for confirmation. Smaller values detect more local turns, larger values produce fewer and usually more significant pivots. A pivot is confirmed only after Pivot Right bars, so detection has a built-in delay.
Pivot Count
This parameter sets how many of the most recent High and Low pivots are kept in the buffer. A value of 2 builds a segment through two points on each side. Higher values increase selectivity: a line is created only when a pair meeting the structural rules can be found. The channel does not appear until both sides have collected the same required number of pivots.
Pivot Age and Channel Width
Max Pivot Age removes old points so a fresh pivot is not paired with a stale extreme. Minimum Channel Width rejects formations that are too short and accidental.
Dynamic Channel Adjustment
Until a confirmed breakout, a wick can bend the active boundary toward the new extreme. A temporary wick pierce does not end the channel. A breakout still requires a close beyond the line with an ATR margin.
ATR-Based Breakout and Close-Based Confirmation
A breakout is valid on the close only:
- above resistance + ATR × multiplier — long,
- below support − ATR × multiplier — short.
A wick alone does not generate a signal. The threshold scales with volatility: a higher multiplier cuts false breakouts, a lower one produces more signals.
Channel History and Pivot Reset
After a breakout the active channel is cut at the breakout bar and moved into history. Max Channels Shown limits how many old formations remain on the chart.
Reset Pivots on Breakout off: the next channel can form immediately from a mix of old and new pivots. On: both buffers are cleared and a completely new set of points must be collected.
TP/SL Framework
Each new breakout can draw:
- Entry — the close of the breakout candle,
- SL — ATR × multiplier or a fixed percent from entry,
- TP1 / TP2 / TP3 — targets as multiples of the Entry–SL distance (RR).
The layout moves with the chart and is closed when price hits SL or the farthest enabled TP.
█ FEATURES
General
- Max channels shown (history) — how many completed channels stay on the chart. Older ones are removed after the limit is exceeded.
Pivots
- Pivot Left / Pivot Right — sensitivity and confirmation delay of pivot detection.
- Pivots required to define a line — number of points in the buffer (2–6) on each side. The channel appears only after that many High pivots and that many Low pivots have been collected.
- Max pivot age (bars) — maximum age of a point.
- Minimum channel width (bars) — minimum length of the formation.
- Line extension to the right (bars) — visual extension of the lines to the right only; it does not affect detection.
Breakout
- ATR Period — ATR length used for the minimum breakout size.
- Minimum breakout size (x ATR), close only — required distance beyond the line on the close.
- Reset pivots on breakout — clears the buffers after a signal.
Appearance
- Resistance / Support Color — boundary colors.
- Trend line transparency — transparency of the channel lines.
- Channel fill color + Fill transparency — fill between the boundaries.
- Show breakout signals — triangles below/above the bar.
- Show dots on pivots — markers on every newly confirmed pivot.
- Dot color — resistance / support pivots.
TP/SL
- Show TP/SL Levels — enables the full layout.
- SL = ATR — SL from ATR or from a percentage.
- ATR Period (TP/SL) — separate ATR for the targets.
- ATR Multiplier for SL / SL % from Entry.
- RR for TP1 / TP2 / TP3.
TP/SL Display
- Show SL / TP1 / TP2 / TP3 Level — independent display of each level and its label.
█ APPLICATIONS
Channel Structure Analysis
Automatic drawing of sloped boundaries instead of connecting pivots by hand. Useful in trends, pullbacks and periods when price respects two parallel or near-parallel edges.
Breakout Confirmation
A triangle marks a close outside the channel with an ATR filter, not a mere line pierce. It is a starting point for further analysis of direction, momentum and context — not a standalone entry signal.
Risk/Reward Planning
After a breakout, Entry, SL and three targets are visible at once. SL can be based on volatility (ATR) or on a fixed percentage.
█ NOTES
- Larger Pivot Left/Right values mean slower, more selective detection.
- The signal is close-only; a wick can only bend the line.
- The breakout threshold scales with ATR.
- After a breakout the channel is archived; the pivot reset setting decides whether the next formation starts from scratch.
- TP/SL is visual R:R planning, not an assessment of trade quality. Indicador

Keltner Channel Trend + SMC Liquidity Sweep [BigBeluga]🔵 OVERVIEW
The Keltner Channel Trend + SMC Liquidity Sweep is an advanced technical indicator created by BigBeluga to map volatility channels alongside Smart Money Concepts (SMC) liquidity pools and structural sweep zones. Traditional momentum strategies often fail to account for institutional liquidity resting above swing highs and below swing lows. In order to provide a solution to this problem, this indicator combines Keltner Channel trend metrics with dynamic Buyside Liquidity (BSL) and Sellside Liquidity (SSL) box tracking, identifying high-probability liquidity sweeps and trend continuation triggers directly on the chart.
The indicator aims to visualize volatility expansion, structural liquidity pools, and stop-hunt reversal zones. The core element of its calculation involves evaluating Keltner Channel moving average basis lines and Average True Range offset bands alongside swing pivot extremes.
The system establishes a dynamic trend envelope using exponential moving averages and volatility multipliers, while swing pivot detection locates key structural high and low levels. Higher values of length and multiplier settings allow the indicator to filter market noise and isolate major institutional liquidity zones.
🔵 FEATURES
The system utilizes a multi-layered matrix structure to provide actionable market intelligence:
1 — Keltner Channel Trend Engine
Adaptive Basis Midline: Computes an Exponential Moving Average basis line that dynamically changes color based on its slope.
Volatility Bands: Projects upper and lower ATR-based channel bands with a background fill to gauge volatility expansion and contraction.
2 — SMC Liquidity Pool Tracking
Buyside & Sellside Zones: Automatically plots dynamic BSL and SSL range boxes when swing pivots form outside the Keltner Channel boundaries.
Extended Box Projections: Continuously updates and extends active liquidity boxes forward until price interacts with the structural levels.
3 — Liquidity Sweep & Mitigation Detection
Sweep Reversals: Detects when price wicks past a liquidity level (BSL/SSL) but fails to close beyond it, signaling an institutional sweep and triggering entry labels.
Structural Break Handling: Automatically terminates and restyles liquidity boxes into dashed gray zones when candles close cleanly past the levels.
🔵 HOW TO USE
Apart from the basic visualization of trend channels, this tool can also act in alternative ways to support decision-making:
Spot Institutional Liquidity Sweeps: Monitor the chart for SSL sweep or BSL sweep labels occurring when price wicks past BSL or SSL boxes outside the Keltner bands.
Trade Trend Reversals from Sweeps: Use bullish SSL sweep signals as potential long entries following a sell-side liquidity grab, and bearish BSL sweep signals as short entries after a buy-side sweep.
Track Trend Momentum via Midline: Observe the color transitions of the Keltner Channel basis line to align trades with the prevailing higher-timeframe trend direction.
🔵 NOTES
Why this implementation is unique:
It bridges traditional volatility-based Keltner Channels with advanced Smart Money Concepts liquidity pooling and sweep detection.
The dynamic box engine automatically manages box extensions, terminations, and mitigation styling.
The script is fully optimized for performance, utilizing advanced box rendering, custom styling parameters, and strict bar confirmation logic for high-precision execution.
Indicador

Cumulative Delta Divergence Suite## Cumulative Delta Divergence Suite
The underlying cumulative-delta calculation and CDV candle construction are adapted from “Cumulative Delta Volume” by LonesomeTheBlue, licensed under MPL 2.0. This version adds independently developed divergence detection, multi-factor scoring, higher-timeframe analysis, absorption and exhaustion conditions, alerts, timeframe presets, and historical target/stop outcome analysis.
### Overview
Cumulative Delta Divergence Suite is a multi-module volume-pressure analysis indicator built around a cumulative delta oscillator.
The script compares confirmed price pivots with confirmed cumulative-delta pivots and combines divergence analysis with configurable scoring, higher-timeframe context, absorption conditions, Z-score extreme zones, timeframe presets, alerts, and simplified historical target/stop outcome tables.
The purpose of combining these components is to examine disagreement between price structure and directional volume pressure from several related perspectives. The modules are not simply displayed independently. Divergence magnitude, delta momentum, relative volume, trend alignment, higher-timeframe agreement, and pivot spacing can contribute to a shared scoring and classification process.
The displayed conditions are analytical observations. They do not predict that price will reverse, continue, or reach a particular level.
### Cumulative delta calculation
Standard chart volume does not directly separate executed buying volume from executed selling volume.
The cumulative-delta calculation used by this script derives directional volume from each candle's:
* total volume;
* body size;
* upper wick;
* lower wick;
* closing direction.
The resulting directional volume value is accumulated over time to construct the cumulative delta series.
The oscillator is displayed as candles in a separate pane. Users can display either the raw cumulative delta candles or an internally calculated Heikin-Ashi representation.
The Heikin-Ashi option smooths the oscillator structure, but this additional averaging can delay changes and alter the location of oscillator pivots.
The calculation is derived from chart OHLCV data. It does not use exchange bid/ask transaction classifications, footprint data, or order-book data.
### Divergence framework
The script compares confirmed pivots in price with confirmed pivots in the cumulative delta oscillator.
It identifies four divergence structures:
* Regular bullish divergence occurs when price forms a lower low while cumulative delta forms a higher low.
* Regular bearish divergence occurs when price forms a higher high while cumulative delta forms a lower high.
* Hidden bullish divergence occurs when price forms a higher low while cumulative delta forms a lower low.
* Hidden bearish divergence occurs when price forms a lower high while cumulative delta forms a higher high.
Regular divergence highlights disagreement between a new price extreme and the cumulative-delta structure.
Hidden divergence highlights a different form of structural disagreement that traders commonly examine within an existing trend.
Neither type establishes what price will do afterward.
### How the modules work together
The script is designed as a cumulative-delta analysis workflow rather than a collection of unrelated indicators.
Divergence provides the primary structural condition by comparing price pivots with cumulative-delta pivots.
The scoring system then evaluates additional characteristics surrounding that divergence, including divergence magnitude, recent delta-momentum change, relative volume, trend alignment, higher-timeframe agreement, and the distance between the compared pivots.
Absorption conditions examine bars where comparatively strong directional volume occurs with limited price progress under the selected volume, range, body, and confluence filters.
Z-score zones identify cumulative-delta readings that are unusually high or low relative to their recent distribution.
Higher-timeframe analysis provides broader confirmed divergence, trend, and volume context.
These components therefore perform different roles within the same analysis process rather than simply duplicating one another.
### How to use the indicator
Apply the indicator to a symbol that provides usable volume data.
The cumulative delta candles appear in a separate pane below the price chart.
A practical workflow is:
1. Review the broader price trend and market structure.
2. Observe whether cumulative delta generally confirms or disagrees with price.
3. Wait for a confirmed regular or hidden divergence condition.
4. Inspect the optional price and oscillator divergence lines to see which pivots were compared.
5. Review the divergence strength score and A+, B, or C category.
6. Check whether confirmed higher-timeframe context agrees with the current structure.
7. Review nearby absorption conditions and Z-score extreme zones.
8. Examine support, resistance, volatility, liquidity, and candle structure separately.
9. Treat all markers as analytical conditions rather than automatic trade instructions.
10. Test settings, alerts, and historical outcome assumptions on the intended symbol and timeframe.
### Regular bullish divergence
Regular bullish divergence is confirmed when:
* price forms a lower confirmed low;
* cumulative delta forms a higher confirmed low.
Price has therefore reached a new lower pivot while the cumulative-delta oscillator has not produced a corresponding lower pivot.
Traders may examine this disagreement together with market structure, support, momentum, cumulative-delta behaviour after confirmation, Z-score context, absorption conditions, and higher-timeframe structure.
The condition can fail, and price can continue lower after confirmation.
### Regular bearish divergence
Regular bearish divergence is confirmed when:
* price forms a higher confirmed high;
* cumulative delta forms a lower confirmed high.
Price has therefore reached a new higher pivot while the cumulative-delta oscillator has not produced a corresponding higher pivot.
Traders may examine this disagreement together with market structure, resistance, momentum, cumulative-delta behaviour after confirmation, Z-score context, absorption conditions, and higher-timeframe structure.
The condition can fail, and price can continue higher after confirmation.
### Hidden bullish divergence
Hidden bullish divergence is confirmed when:
* price forms a higher confirmed low;
* cumulative delta forms a lower confirmed low.
This structure is commonly examined within an existing upward trend because price retains a higher low while cumulative delta makes a deeper retracement.
It does not guarantee that the upward trend will continue.
### Hidden bearish divergence
Hidden bearish divergence is confirmed when:
* price forms a lower confirmed high;
* cumulative delta forms a higher confirmed high.
This structure is commonly examined within an existing downward trend because price retains a lower high while cumulative delta makes a stronger retracement.
It does not guarantee that the downward trend will continue.
### Raw and Heikin-Ashi CDV candles
When Heikin-Ashi CDV candles are disabled, the script uses the raw cumulative delta candle values.
When they are enabled, the script applies an internal Heikin-Ashi transformation to the cumulative delta series.
This affects only the oscillator displayed by the indicator. It does not convert the main TradingView price chart to Heikin-Ashi candles.
The smoothed representation can make broader cumulative-delta structure easier to inspect, but it may also delay short-term changes and alter oscillator pivot locations.
### Pivot settings and confirmation delay
Pivot Left controls how many earlier bars participate in identifying a pivot.
Pivot Right controls how many later bars must pass before that pivot becomes confirmed.
Higher pivot values generally produce fewer pivots, filter more short-term movement, and confirm conditions later.
Lower pivot values generally produce more pivots and react more quickly, but they are also more sensitive to short-term movement.
A pivot-based divergence is not known on the original pivot bar.
The script must wait for the configured number of Pivot Right bars before the pivot can be confirmed.
After confirmation, divergence markers and optional connecting lines are drawn at the original pivot location so users can visually inspect the price-versus-CDV structure.
For example, when Pivot Right is 5, five subsequent bars are required before the pivot is confirmed.
Consequently, a historical divergence marker appears on the earlier pivot bar even though the condition only became known several bars later.
Alerts for pivot-based divergences occur after confirmation, not on the earlier pivot bar.
### Divergence lines
The script can draw oscillator pivot-to-pivot lines in the indicator pane and corresponding price pivot-to-pivot lines on the main chart.
These lines show the exact pair of pivots used for the divergence comparison.
For example, regular bullish divergence connects two price lows where the newer price pivot is lower while the corresponding cumulative-delta pivot is higher.
The lines can be disabled when a cleaner chart is preferred.
### Divergence strength score
The optional divergence strength value measures the relative displacement between the compared price pivots and cumulative-delta pivots.
It is derived from the magnitude of the price movement and the magnitude of the oscillator movement between the compared pivots.
It is not a probability, win rate, or forecast.
The Minimum Divergence Strength setting can suppress conditions whose calculated magnitude is below the selected value.
### Composite scoring
Each confirmed divergence can receive a configurable composite score.
The score combines several measurements:
* divergence strength;
* recent change in smoothed delta momentum;
* volume relative to its recent average;
* alignment with the script's EMA-based trend state;
* agreement with confirmed higher-timeframe divergence context;
* distance between the compared pivots.
Each component performs a different function.
Divergence strength measures the magnitude of the structural disagreement.
Delta momentum examines recent directional change in the smoothed delta series.
Relative volume measures participation around the evaluated pivot.
Trend alignment provides directional price context.
Higher-timeframe agreement measures whether the selected confirmed HTF divergence context supports the same side.
Pivot spacing distinguishes closely grouped pivots from structures developing across a wider interval.
Users can adjust the contribution of these components through the scoring weights.
The active weights are normalized before the final composite value is calculated.
The score organizes conditions according to the selected model. It is not a prediction of future performance.
### Score categories
The script assigns A+, B, or C categories according to the configured score thresholds.
These categories are internal classifications.
They are not probabilities, win rates, accuracy measurements, guarantees, or independently validated performance rankings.
An A+ category means only that the condition reached the highest configured score range.
A B category means that the condition reached the middle configured range.
A C category represents conditions below the B threshold that remain eligible under the selected filter.
The Minimum Grade setting can suppress conditions below the selected category.
### Score transformation
The Score Boost Power applies a nonlinear transformation to the composite score before the A+, B, and C thresholds are evaluated.
Lower values compress scores upward and therefore allow higher categories to occur more frequently.
Higher values keep transformed scores closer to the underlying composite values and make the upper categories more selective.
This setting changes the script's internal classification behaviour. It does not increase the probability that a condition will succeed.
### Adaptive score scaling
When Adaptive Grade Scaling is enabled, the script compares the current raw composite score with the recent distribution of composite scores.
It uses a rolling mean and standard deviation to place the current value in the context of recently observed values before the category thresholds are applied.
When adaptive scaling is disabled, category thresholds are applied to the unscaled composite score.
Because adaptive scaling is relative to recent observations, the same general type of structure can receive different categories under different market conditions.
### Higher-timeframe context
The script can evaluate divergence context from a user-selected higher timeframe.
The HTF module calculates its pivot structure, trend context, and relative-volume component using confirmed data from the requested higher timeframe.
The script uses the last fully closed higher-timeframe information rather than relying on a still-forming HTF candle.
This means higher-timeframe information becomes available only after the required higher-timeframe data has been confirmed.
The HTF module identifies regular bullish, regular bearish, hidden bullish, and hidden bearish cumulative-delta divergence structures.
Its scoring process combines HTF divergence strength with HTF trend context and HTF volume participation.
Higher-timeframe conditions can be displayed separately and can also contribute to the chart-timeframe composite score.
An independent HTF Minimum Grade setting determines which higher-timeframe categories are displayed.
Because confirmed HTF data is used, higher-timeframe conditions can appear later than chart-timeframe conditions.
Higher-timeframe context should therefore be interpreted as broader confirmed information rather than an earlier signal.
### Absorption conditions
The absorption module searches for bars where comparatively large directional delta occurs while price progress remains constrained under the selected filters.
The module evaluates:
* directional delta relative to its recent average;
* volume relative to its recent average;
* candle range relative to its average;
* candle body as a proportion of the complete range;
* an optional close opposing the delta direction;
* optional proximity to a recently graded divergence.
A bullish absorption condition is associated with comparatively strong negative delta while downward price progress remains limited under the configured filters.
A bearish absorption condition is associated with comparatively strong positive delta while upward price progress remains limited under the configured filters.
The module is derived from chart OHLCV information. It does not prove that passive limit orders absorbed aggressive market orders.
The markers should therefore be interpreted as absorption-style analytical conditions rather than direct measurements of order-book behaviour.
### Absorption confluence and filtering
Absorption conditions can be filtered using recent divergence proximity, minimum divergence category, cooldown bars, volume thresholds, delta thresholds, range thresholds, body-to-range limits, and optional opposite-close confirmation.
When divergence confluence is enabled, the absorption condition must occur within the configured number of bars following a qualifying divergence.
The absorption grade displayed with a condition is derived from the nearby qualifying divergence category.
These filters change which conditions are displayed. They do not guarantee a particular subsequent price outcome.
### Z-score extreme zones
The script calculates a Z-score from the cumulative-delta oscillator's rolling mean and standard deviation.
A lower extreme zone appears when the oscillator moves below the selected negative Z-score threshold.
An upper extreme zone appears when the oscillator moves above the selected positive threshold.
These zones identify values that are unusually high or low relative to the oscillator's recent statistical distribution.
The Z-Score Length determines how much history contributes to the rolling mean and standard deviation.
The Z-Score Threshold determines how many standard deviations the oscillator must move from its rolling mean before an extreme zone is displayed.
Higher thresholds produce fewer extreme zones. Lower thresholds produce more frequent zones.
An extreme value does not establish that buying or selling pressure is exhausted and does not establish that price will reverse.
Extreme readings can persist or become more extreme.
### Using divergence, absorption, and Z-score context together
The modules provide different forms of information.
Divergence compares price pivot structure with cumulative-delta pivot structure.
Absorption examines strong directional delta occurring with constrained price progress.
Z-score analysis measures whether cumulative delta is unusually high or low relative to recent values.
Higher-timeframe analysis provides broader confirmed structural context.
Composite scoring organizes divergence conditions according to multiple characteristics of the setup.
The purpose of combining these modules is to provide several related perspectives on price-versus-volume-pressure disagreement without treating any one module as a complete trading system.
Confluence between modules provides additional analytical context but does not automatically validate a condition or guarantee reversal or continuation.
### Timeframe presets
The script contains lower-, medium-, and higher-timeframe preset bundles.
The presets adjust selected settings including:
* pivot lengths;
* score transformation power;
* adaptive score scaling;
* Heikin-Ashi CDV display;
* absorption averaging lengths;
* absorption thresholds;
* absorption confluence lookback.
The presets are intended as starting configurations.
They are not automatically optimized for the active symbol and have not been fitted to guarantee particular historical results.
Users can disable Apply Timeframe Preset to configure the corresponding settings manually.
### Cooldown settings
Independent cooldown controls can reduce repeated conditions of the same type.
Separate cooldown settings are available for regular divergences, hidden divergences, higher-timeframe divergences, absorption conditions, and Z-score extreme conditions.
A value of zero disables the relevant cooldown.
Higher cooldown values reduce repeated same-direction markers but can also suppress nearby structures that would otherwise qualify.
### Historical target/stop outcome tables
Optional tables provide a simplified historical outcome study for confirmed divergence and absorption conditions.
When a condition is confirmed, the script records the confirmation-bar closing price and calculates a fixed percentage target and fixed percentage stop level.
The target and stop percentages are user configurable.
Outcome evaluation begins on the bar after the condition is confirmed.
This prevents price movement that occurred earlier within the confirmation bar from being counted as a subsequent target or stop event.
Each confirmed condition is tracked independently.
If another qualifying condition appears before an earlier condition has resolved, the newer condition does not replace the earlier unresolved condition in the historical study.
For each tracked condition, the script records whether the target or stop is reached first.
If both the target and stop are touched during the same evaluation candle, standard OHLC chart data does not reveal which level was reached first. In this situation the script uses a conservative convention and counts the stop as occurring first.
Separate tables are available for:
* regular bullish divergence;
* regular bearish divergence;
* hidden bullish divergence;
* hidden bearish divergence;
* bullish absorption;
* bearish absorption.
The tables display the number of target-first outcomes, stop-first outcomes, and the resulting target-first percentage for the available chart history.
These tables are intended as a basic chart-based comparison tool.
They are not TradingView Strategy Tester results and are not a complete strategy backtest.
They do not model commissions, slippage, bid/ask spread, realistic order execution, position sizing, portfolio equity, liquidity, partial fills, or complete intrabar price sequencing.
Historical results depend on the symbol, timeframe, available chart history, target and stop distances, filters, indicator settings, and available volume data.
The table percentages describe only the simplified historical study produced under those settings. They do not imply future performance.
### Evaluation target and stop lines
The script can display the fixed target and stop levels associated with the most recently confirmed qualifying condition.
The Target and Stop labels remain anchored at the left side of their respective lines. While the outcome is unresolved, the lines extend to the right. Once either the target or stop is reached, the lines end at the resolution bar and remain visible until a newer qualifying condition replaces them.
These levels use the same configurable percentage distances as the historical outcome study and are provided for visual evaluation rather than as trading recommendations.
Only the most recent Target/Stop pair is displayed to limit chart clutter, while historical conditions continue to be tracked independently by the outcome tables.
### Alerts
Alerts are available for configured divergence, absorption, and exhaustion conditions.
Pivot-based regular and hidden divergence alerts occur only after the required Pivot Right bars have confirmed the pivot.
A+ divergence alerts require the underlying divergence to qualify for the A+ category.
Absorption conditions can depend on values from the current chart bar and can therefore change while that bar is still forming.
Z-score extreme conditions can likewise change as the current chart bar develops.
Users who require closed-bar confirmation should configure their TradingView alert frequency accordingly.
Higher-timeframe divergence context uses confirmed higher-timeframe information.
### What makes the implementation distinct
The script extends a cumulative-delta framework into a broader price-versus-volume-pressure analysis workflow.
Its distinguishing structure includes:
* cumulative delta candle visualization;
* optional internal Heikin-Ashi smoothing;
* regular and hidden pivot-based price/CDV divergence analysis;
* configurable divergence strength filtering;
* multi-factor divergence scoring;
* user-adjustable scoring weights;
* nonlinear score transformation;
* adaptive score scaling;
* A+, B, and C classification and filtering;
* confirmed higher-timeframe divergence analysis;
* higher-timeframe trend and volume context;
* absorption conditions that can be linked to recently graded divergences;
* Z-score extreme analysis;
* timeframe-based parameter presets;
* independent cooldown controls;
* independent tracking of historical target/stop outcomes;
* configurable target and stop evaluation levels;
* divergence, absorption, exhaustion, and grade-based alerts.
The purpose of this combination is to evaluate price-versus-cumulative-delta disagreement using several related measurements within a single workflow.
The divergence module identifies the structural event. The score measures characteristics of that structure and its surrounding context. Higher-timeframe analysis supplies broader confirmed context. Absorption examines directional volume occurring with limited price progress. Z-score analysis identifies statistically unusual oscillator readings. The historical tables provide a simplified way to inspect what happened after past qualifying conditions.
This integration is the reason the components are combined rather than published merely as separate common indicators placed together.
### Limitations
Cumulative delta in this script is derived from candle structure and chart volume rather than exchange bid/ask transaction classifications.
Volume quality and interpretation vary between exchanges, brokers, instruments, and symbols.
Pivot-based divergences are delayed by the selected Pivot Right value.
Confirmed pivot markers and divergence lines are drawn on the earlier pivot location after confirmation, so historical marker placement is earlier than the time at which the condition became known.
Heikin-Ashi smoothing changes the cumulative-delta oscillator structure and can introduce additional delay.
Higher-timeframe analysis waits for confirmed HTF information, which can delay HTF conditions.
Divergence conditions can fail and price can continue in the same direction after a divergence has been confirmed.
Hidden divergence does not guarantee trend continuation.
Absorption conditions are OHLCV-based analytical approximations and do not directly identify passive order-book absorption.
Z-score extremes can persist or become more extreme.
Composite scores and A+, B, and C categories are model outputs, not probabilities, win rates, accuracy measurements, or independently validated performance rankings.
Adaptive scaling can change classifications as the recent score distribution changes.
Lower timeframes can produce more frequent and noisier conditions.
Timeframe presets are starting configurations and are not automatically optimized for a symbol.
Historical target/stop tables are simplified outcome studies and do not represent complete strategy backtests.
Historical target-first percentages depend heavily on the selected target/stop distances, indicator settings, symbol, timeframe, available history, and market conditions.
The indicator does not model commissions, slippage, spread, liquidity, or realistic execution.
No divergence, score category, absorption condition, Z-score reading, target/stop outcome, or combination of these elements guarantees future market behaviour.
The indicator should not be used as the sole basis for a trading decision.
This script is an analytical tool and does not provide financial advice or guaranteed trading outcomes. Indicador

Buy/Sell ZonesBuy/Sell Zones
Overview
Buy/Sell Zones is a market structure indicator designed to identify potential shifts in directional order flow through Change of Character (CHOCH) events.
When a confirmed swing level is broken in the opposite direction of the previous structural break, the indicator creates a new:
BUY ZONE after a bullish CHOCH.
SELL ZONE after a bearish CHOCH.
Each zone includes a structure-break line, a directional range box, an entry level, projected range targets, optional confirmation filters, deviation markers, alerts, and a reference-asset HUD.
The indicator is not designed to predict every market reversal. Its purpose is to provide a structured visual framework for analyzing transitions between bullish and bearish market conditions.
Market Structure Detection
Swing highs and lows are detected using a configurable fractal length.
The default Fractal Length is 12. A higher value produces fewer but more significant structural levels, while a lower value reacts more quickly to short-term price action.
A structure break can be confirmed in two ways:
Close Beyond Level: The candle must close beyond the swing level.
Wick Beyond Level: The candle only needs to trade beyond the swing level.
Requiring a candle close generally produces fewer and more conservative signals.
CHOCH Logic
The indicator tracks the direction of the most recent structural break.
A bullish break following a bearish structural state creates a BUY ZONE.
A bearish break following a bullish structural state creates a SELL ZONE.
Repeated breaks in the same direction update the structural state but do not automatically create another CHOCH zone.
BUY and SELL Zone Boxes
The directional boxes are designed to display the complete price range between the originating structure level and the candle that breaks it.
BUY ZONE Box
For a bullish structure break:
The left edge begins at the pivot-high candle.
The right edge ends after the candle that breaks the pivot high.
The upper boundary is the broken pivot-high level.
The lower boundary is the lowest wick formed between the pivot and the breakout candle.
The box uses the bullish color scheme.
SELL ZONE Box
For a bearish structure break:
The left edge begins at the pivot-low candle.
The right edge ends after the candle that breaks the pivot low.
The lower boundary is the broken pivot-low level.
The upper boundary is the highest wick formed between the pivot and the breakdown candle.
The box uses the bearish color scheme.
The box borders use a dotted style to keep the zones visible without making the chart excessively heavy.
Structure Lines and Zone Labels
Every accepted zone includes a directional line connecting the originating pivot to the structure-breaking candle.
BUY ZONE: Green structure line with the label positioned above it.
SELL ZONE: Red structure line with the label positioned below it.
The label is placed near the time-based midpoint of the structure line.
The Zone Label Distance (ATR) setting controls the vertical distance between the label and the line. Because the distance is normalized with ATR, the label placement adapts to different assets, prices, and volatility conditions.
Entry Level
The midpoint of the CHOCH signal candle’s range is treated as a potential entry reference.
Bullish CHOCH midpoint: LONG ENTRY LEVEL
Bearish CHOCH midpoint: SHORT ENTRY LEVEL
This is a reference level rather than an automatic trade signal. Traders may combine it with retests, lower-timeframe confirmation, volume behavior, candle structure, or their own risk-management model.
Range Projection Levels
The signal candle’s full high-to-low range is used as the projection unit.
The indicator initially displays:
+0.5
+1
+1.5
+2
+3
+4
-0.5
-1
-1.5
-2
-3
-4
These levels can be used as potential reaction areas, expansion targets, profit-management references, or invalidation zones.
Automatic Long-Trend Expansion
To support extended directional moves, additional levels are activated automatically:
When price trades above +4, the indicator reveals +5, +6, +7, and +8.
When price trades below -4, the indicator reveals -5, -6, -7, and -8.
The additional levels remain hidden until the corresponding +4 or -4 boundary is crossed.
Optional Filters
All filters are optional and can be enabled independently.
VWAP Direction Filter
When enabled:
BUY ZONE creation requires price to close above the session VWAP.
SELL ZONE creation requires price to close below the session VWAP.
The VWAP line can be displayed separately.
EMA Trend Filter
The EMA filter is disabled by default, with a default length of 20.
When enabled:
BUY ZONE creation requires price to be above the EMA.
SELL ZONE creation requires price to be below the EMA.
Relative Volume Filter
This filter compares current volume with average volume.
A zone is rejected when current volume is below the selected multiple of its moving average.
This can help remove structure breaks that occur during relatively weak participation. It may be less useful on instruments that do not provide reliable centralized volume data.
ATR Zone-Size Filter
The signal candle’s range is normalized against ATR.
Zones can be rejected when their signal candles are:
Too small relative to current volatility.
Excessively large relative to current volatility.
This helps prevent unusually narrow or highly extended candles from generating unwanted zones.
Confirmed-Bar Filter
When enabled, a zone is created only after the structure-breaking candle has closed.
This reduces intrabar signal changes and is particularly useful for alerts.
Minimum Bars Between Zones
A configurable cooldown can be applied between accepted CHOCH zones.
This is useful for reducing clustered signals during sideways or highly volatile conditions.
Return-to-Range Detection
The indicator can monitor price movement beyond the outer +4 and -4 boundaries.
If price trades above +4 and later closes back inside the active range, a bearish return-to-range event is detected.
If price trades below -4 and later closes back inside the active range, a bullish return-to-range event is detected.
The visual marker is disabled by default and can be enabled from the Deviation Marker settings.
Return-to-range detection does not automatically imply a reversal. It identifies a possible failed expansion or deviation that may require additional confirmation.
Reference Asset Zone HUD
The indicator includes a configurable HUD that tracks the latest structural zone of another asset on the current chart timeframe.
The HUD displays:
Selected reference asset.
Reference asset’s current BUY or SELL zone.
Mapped signal for the chart.
Current timeframe.
Direct or inverse mapping mode.
The HUD size can be set to:
Tiny
Small
Normal
Large
The default size is Normal.
Why Is USDT Dominance the Default Reference?
The default reference symbol is:
CRYPTOCAP:USDT.D
USDT Dominance represents the percentage of the total cryptocurrency market capitalization held in Tether.
It is commonly monitored as a broad crypto risk-flow reference:
Rising USDT.D can indicate that capital is moving toward stablecoins and away from risk assets.
Falling USDT.D can indicate that capital is rotating from stablecoins into cryptocurrencies.
For this reason, the HUD uses inverse mapping by default:
USDT.D BUY ZONE → Chart SELL ZONE
USDT.D SELL ZONE → Chart BUY ZONE
For example, when analyzing BTC, ETH, or another cryptocurrency, a bullish structural state in USDT.D may represent defensive capital flow and therefore map to a bearish signal for the crypto chart.
This relationship is not constant and can weaken or temporarily reverse. The reference HUD should be used as contextual confirmation rather than as an independent entry system.
Reference Ideas for Other Markets
Any TradingView-supported symbol can be selected as the HUD reference asset.
Gold Traders
Gold traders may consider monitoring:
TVC:DXY — U.S. Dollar Index
TVC:US10Y — U.S. 10-Year Treasury Yield
A directly related gold instrument or futures contract
Gold frequently has an inverse relationship with the U.S. dollar. Therefore, traders using DXY as the reference may prefer inverse mapping:
DXY BUY ZONE → Gold SELL bias
DXY SELL ZONE → Gold BUY bias
Treasury yields can also affect gold, but the relationship may change depending on inflation expectations, real yields, monetary policy, and risk sentiment.
Nasdaq Traders
Nasdaq traders may consider:
CBOE:VIX — Volatility Index
TVC:US10Y — U.S. 10-Year Treasury Yield
TVC:DXY — U.S. Dollar Index
NASDAQ:QQQ or a related Nasdaq futures symbol for direct confirmation
The VIX is generally used with inverse mapping:
VIX BUY ZONE → Nasdaq SELL bias
VIX SELL ZONE → Nasdaq BUY bias
Higher Treasury yields can pressure growth and technology stocks, but this relationship is regime-dependent. DXY may also influence risk assets and multinational technology companies, although it should not be treated as a fixed inverse signal.
When using a positively correlated reference asset, disable Invert Reference Signal to use direct mapping.
Alerts
The indicator provides three optional alert conditions:
BUY Zone Created
Triggered when a new BUY ZONE passes all enabled filters and is created.
SELL Zone Created
Triggered when a new SELL ZONE passes all enabled filters and is created.
Price Returning to Range
Triggered when price trades beyond +4 or -4 and subsequently closes back inside the active range.
Each alert can be enabled or disabled independently from the indicator settings.
After enabling an alert option, create the corresponding alert through TradingView’s alert dialog. Using Once Per Bar Close is recommended when confirmed signals are preferred.
Important Usage Notes
Pivot-based market structure requires future bars to confirm a swing. Signals are therefore intentionally delayed by the selected pivot strength.
Confirmed historical pivots do not change after confirmation.
Break conditions can change during a live candle when the confirmed-bar filter is disabled.
The reference HUD uses the chart timeframe.
Relationships between markets are dynamic and may change across volatility, liquidity, macroeconomic, and monetary-policy regimes.
Enabling multiple strict filters can significantly reduce the number of zones.
The indicator does not calculate position size, stop loss, risk-to-reward, commission, slippage, or portfolio exposure.
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, trading, or legal advice and should not be interpreted as a recommendation to buy or sell any asset. Market structure signals, projected levels, reference-asset relationships, and inverse correlations can fail or change without warning. Historical performance and visual examples do not guarantee future results. Always perform your own research, confirm signals independently, use appropriate risk management, and consult a qualified financial professional before making trading or investment decisions. The user assumes full responsibility for all trading decisions, profits, and losses. Indicador

HTF Structure LensHTF Structure Lens
HTF Structure Lens is a multi-timeframe market-structure workspace designed to bring higher-timeframe price action and structural events directly onto the active chart.
Rather than switching repeatedly between timeframes, the indicator displays up to six higher-timeframe candle sets alongside the structural information derived from those candles. Its purpose is to provide a single visual framework for following higher-timeframe liquidity, candle structure and changes in delivery while executing on a lower timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY THESE FEATURES ARE COMBINED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The features in HTF Structure Lens are designed around the same higher-timeframe price structure rather than functioning as unrelated indicators.
The HTF candles provide the underlying price representation. Swing levels and liquidity sweeps identify where those candles interact with previous extremes. C2/C3 classification identifies specific sweep, closure and reversal behaviour within that structure. CISD provides a separate delivery-confirmation layer that can then be compared with those higher-timeframe events.
This allows a trader, for example, to observe a higher-timeframe liquidity sweep and C2 closure while simultaneously monitoring lower-timeframe CISD confirmation without changing charts.
The indicator is intended as a discretionary analysis tool. It does not automatically determine directional bias, entries, exits or trade recommendations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MULTI-TIMEFRAME HTF CANDLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Display up to six independent higher-timeframe candle sets simultaneously.
Each set includes configurable:
• Timeframe
• Number of displayed candles
• Candle spacing and positioning
• Body, border and wick styling
The currently forming HTF candle updates as new price data becomes available. Completed HTF candles retain their completed OHLC structure.
Per-chart-timeframe visibility controls allow different HTF sets to be displayed depending on the timeframe currently being viewed.
An optional Automatic HTF Ladder can dynamically adjust selected HTFs as the chart timeframe changes.
Daily candles can also use selectable session-based boundaries, including Midnight, 08:30 and 09:30 New York time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STRUCTURE AND SWINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF Structure Lens identifies structural information directly from the displayed higher-timeframe candles.
Swing highs and lows can be displayed with separate styling for potential and confirmed levels.
An optional equilibrium (EQ) line marks the midpoint of a candle's range.
Fair Value Gaps and Volume Imbalances can also be displayed within the HTF candle representation to provide additional context around price delivery.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
C2 CLOSURE AND C3 REVERSAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The indicator includes a three-candle fractal framework for classifying specific higher-timeframe candle behaviour.
C2 Closure
A bullish C2 occurs when price trades below the previous candle's low and subsequently closes back above that level. A bearish C2 occurs when price trades above the previous candle's high and subsequently closes back below that level. Outside candles that sweep both sides are excluded from C2 classification.
C3 Reversal
C3 logic identifies a separate body-engulfing reversal condition where the previous candle's body is engulfed without the corresponding liquidity sweep required for a C2. Continuation cases following an existing C2 are filtered so that standalone C3 reversals can be distinguished from continuation behaviour.
C2 and C3 labels can be displayed on the HTF candle representation and, optionally, on the underlying chart bar where the completed HTF event occurred.
Confirmed C2/C3 classifications use completed candle information.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LIQUIDITY SWEEP VISUALIZATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF liquidity levels can be projected back onto the underlying chart so that the origin and eventual sweep of a higher-timeframe level can be seen directly within lower-timeframe price action.
Two modes are available:
Confirmed Sweeps — displays sweeps that subsequently close back through the relevant level, corresponding with C2 closure behaviour.
All Sweeps — displays any wick that trades through the relevant previous level regardless of the eventual candle close.
Sweep-line appearance is configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CISD — CHANGE IN STATE OF DELIVERY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF Structure Lens includes an independent CISD framework that can monitor up to three timeframes simultaneously.
Each CISD instance can use the current chart timeframe or a separately selected timeframe.
The display can include:
• Developing CISD level
• Confirmed CISD level
• Protected swing associated with the current delivery state
This allows lower-timeframe delivery changes to be viewed in the context of higher-timeframe structural events displayed by the rest of the indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF PERIOD BOUNDARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
An optional HTF Period Boundary marks the beginning of a selected higher-timeframe period directly on the underlying chart.
This can be used to visually align lower-timeframe price action with the opening of Daily, 4H or other selected HTF periods.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Independent alerts are available for:
• Bullish and bearish C2 Closures
• Bullish and bearish C3 Reversals
• CISD confirmations
C2/C3 alerts can be selected independently for the displayed higher timeframes.
Confirmed structural alerts are designed to trigger from completed candle information rather than developing HTF conditions.
Alert messages include relevant ticker, timeframe and directional information.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REPAINTING / LIVE DATA BEHAVIOUR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The currently forming HTF candles and developing structural levels update as new price information becomes available. This is intentional because they represent live, incomplete market structure.
Confirmed C2/C3 events and other completed-candle structural classifications use completed candle data and are not subsequently recalculated from changes to the live candle.
Users should therefore distinguish between developing visual information and confirmed structural events.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ORIGINALITY AND OPEN-SOURCE ATTRIBUTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF Structure Lens builds upon the open-source ICT HTF Candles (fadi) script by fadizeidan, which provided part of the original higher-timeframe candle visualization foundation. The original work is licensed under the Mozilla Public License 2.0.
This project substantially extends that foundation into a broader multi-timeframe structure-analysis environment. Additions and modifications include functionality such as C2/C3 structural classification, liquidity sweep tracking and chart projection, swing-state visualization, equilibrium levels, multi-timeframe CISD analysis, structural alerts, timeframe-dependent visibility, Automatic HTF Ladder behaviour, HTF period boundaries, and additional integration between higher-timeframe structure and the underlying chart.
The source code is published openly in accordance with TradingView's open-source reuse requirements and to preserve attribution to the original work.
Credit to fadizeidan for the open-source HTF candle foundation that contributed to the development of this project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USAGE AND LIMITATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HTF Structure Lens is designed for discretionary multi-timeframe analysis. Structural classifications such as C2, C3, sweeps and CISD represent defined price-action conditions; they should not be interpreted as automatic buy or sell signals.
Live HTF candles and developing levels can change until their respective periods close.
Users should test the indicator on the markets, sessions and timeframes relevant to their own analysis.
This indicator is provided for educational and informational purposes only and does not constitute financial advice. Historical price behaviour does not guarantee future results. Indicador

Oat Minervini SET50 Dashboard Autoscan # Dr.Oat SEPA SET50 Radar V2.0
**Dr.Oat SEPA SET50 Radar** is a quantitative screening tool designed to scan SET50 stocks using a rules-based framework inspired by SEPA and Stage 2 trend principles.
The indicator focuses on identifying stocks that are:
* In a strong Stage 2 uptrend
* Forming a constructive volatility contraction structure
* Approaching a potential Pivot Point
* Breaking out with expanding volume
* Becoming extended beyond an ideal entry zone
All calculations are performed on the **Daily timeframe**, regardless of the chart timeframe currently being viewed.
Because of Pine Script request limitations, the SET50 universe is divided into two groups:
**SET50 A:** Stocks 1–25
**SET50 B:** Stocks 26–50
For complete SET50 coverage, add the indicator to the chart twice and select one group for each instance.
---
# Dashboard Columns
## SEPA
SEPA is the overall setup score from 0 to 100.
The score currently combines:
* Trend Template Quality
* VCP Structure
* Volume Quality
* Pivot Position
* Breakout Quality
Daily RSI is **not included** in the SEPA Score.
A higher score indicates that more elements of the setup are aligned.
General interpretation:
**90–100:** Very Strong Setup
**80–89:** Strong Setup
**70–79:** Developing / Watch
**Below 70:** Lower Priority
A high SEPA Score does not automatically mean the stock should be bought.
Always review the price chart and risk/reward before entering a trade.
---
# TT — Trend Template
TT represents the number of Stage 2 Trend Template conditions currently satisfied.
The current model uses **7 conditions**.
### 1. Price Above SMA150 and SMA200
The current closing price must be above both the 150-day and 200-day simple moving averages.
### 2. SMA150 Above SMA200
The intermediate-term moving average must be above the long-term moving average.
### 3. SMA200 Rising
The current SMA200 must be above its value approximately 22 trading days ago.
This helps confirm that the long-term trend is rising.
### 4. SMA50 Above SMA150 and SMA200
The short-term moving average must be above both the intermediate and long-term averages.
### 5. Price at Least 25% Above the 52-Week Low
The current price must have advanced sufficiently from its 52-week low.
### 6. Price Within 25% of the 52-Week High
The current price should remain relatively close to its 52-week high.
### 7. Price Above SMA50
The current closing price must be above the 50-day moving average.
When the Dashboard shows:
**TT = 7/7**
the stock currently satisfies all Trend Template conditions used by this model.
---
# VCP Score
The VCP Score is a quantitative approximation of a **Volatility Contraction Pattern**.
The script does not attempt to visually recognize a classical VCP exactly as a discretionary trader would.
Instead, it evaluates several measurable characteristics:
* Base Depth
* Short-Term Range Contraction
* ATR Contraction
* Volume Dry-Up
* Right-Side Tightness
The maximum score is 100.
General interpretation:
**VCP >= 70:** Constructive contraction characteristics are developing
**VCP >= 80:** Stronger volatility contraction structure
The VCP Score should be treated as a screening tool rather than a definitive pattern-recognition signal.
Always inspect the actual chart before trading.
---
# RSI(D)
RSI(D) displays the Daily Relative Strength Index.
Default setting:
**RSI Length = 14**
RSI is displayed for momentum information only.
RSI is:
* NOT used in the Trend Template
* NOT used in the VCP Score
* NOT used in the SEPA Score
General interpretation:
**RSI below 50:** Weak or neutral momentum
**RSI 50–60:** Improving momentum
**RSI 60–70:** Strong momentum
**RSI 70–80:** Very strong momentum
**RSI above 80:** Extremely strong momentum; check whether price is becoming extended
A high RSI is not automatically considered a sell signal.
Strong market leaders can remain at elevated RSI levels for extended periods.
---
# PIVOT%
PIVOT% shows the percentage distance between the current price and the calculated Pivot Point.
Example:
**-1.20%**
The current price is approximately 1.2% below the Pivot.
Example:
**+0.50%**
The stock is approximately 0.5% above the Pivot.
Values close to zero are particularly useful when monitoring potential breakout setups.
Default settings:
**READY Zone:** Within 5% below the Pivot
**Maximum Chase:** 3% above the Pivot
If price advances too far above the Pivot, the system classifies the stock as **EXTENDED**.
---
# RVOL
RVOL represents Relative Volume.
It compares current daily volume with the 50-day average volume.
Examples:
**RVOL = 0.50x**
Current volume is approximately 50% of the 50-day average.
This can be useful when looking for Volume Dry-Up before a breakout.
**RVOL = 1.00x**
Current volume is approximately equal to average volume.
**RVOL = 1.50x**
Current volume is approximately 50% above the 50-day average.
The default model requires approximately:
**RVOL >= 1.50x**
as part of breakout confirmation.
---
# STATUS
The Radar classifies each stock into one of five statuses.
## BREAKOUT
The stock:
* Passes the Trend Template
* Meets the minimum VCP requirement
* Trades above the Pivot
* Remains within the maximum chase zone
* Has sufficient Relative Volume
These stocks deserve immediate chart review.
BREAKOUT is not an automatic buy order.
Risk/reward and technical stop placement should still be evaluated.
---
## READY
The stock:
* Passes the Trend Template
* Meets the minimum VCP requirement
* Is trading close to, but still below, the Pivot
READY stocks are particularly useful for building a focused watchlist before a potential breakout.
Example:
**PIVOT% = -0.80%**
The stock is approximately 0.8% below its Pivot.
---
## DEVELOP
The stock is in a valid Stage 2 trend but is not yet classified as READY or BREAKOUT.
The setup may still be developing.
These stocks can remain on the watchlist for further observation.
---
## EXTENDED
The stock remains in a strong trend but has advanced beyond the configured Maximum Chase distance above its Pivot.
This status is designed as a warning:
**Do Not Chase**
EXTENDED does not necessarily mean the stock is weak.
It means the current entry location may offer an unfavorable risk/reward profile.
---
## SKIP
The stock does not currently meet the required trend/setup conditions.
It can generally be removed from the immediate trading focus.
---
# Installation
Open TradingView and go to:
**Pine Editor**
Create a new indicator and paste the complete:
**Dr.Oat SEPA SET50 Radar V2.0**
script.
Then select:
**Save → Add to chart**
---
# Recommended Setup — Radar A
Open Indicator Settings and select:
**SET50 Group:**
SET50 A (1-25)
**Display Mode:**
Qualified Only
**Maximum Rows:**
15
**Dashboard Position:**
Top Right
---
# Recommended Setup — Radar B
Add the same indicator to the chart a second time.
Then select:
**SET50 Group:**
SET50 B (26-50)
**Display Mode:**
Qualified Only
**Maximum Rows:**
15
**Dashboard Position:**
Bottom Right
This allows the two instances to cover the complete SET50 universe.
---
# Display Modes
## Qualified Only
Displays stocks where:
**TT = 7/7**
and
**VCP Score >= Minimum VCP Score**
This is the recommended default mode.
---
## READY + BREAKOUT
Displays only stocks currently classified as:
**READY**
or
**BREAKOUT**
This is particularly useful for daily trade preparation.
---
## All 25
Displays all stocks in the selected group.
This mode is useful for:
* Verifying data
* Comparing scores
* Reviewing developing stocks
* Troubleshooting the scanner
---
# Recommended Daily Workflow
Start by opening both SET50 Radar A and Radar B.
Then review stocks in the following order.
### 1. BREAKOUT
Check whether any stock is breaking above its Pivot with expanding volume.
### 2. READY
Identify stocks positioned just below their Pivot.
### 3. SEPA Score
Within the same status category, prioritize higher SEPA Scores.
### 4. Trend Template
Prefer stocks showing:
**TT = 7/7**
### 5. VCP Score
Review whether the stock is showing constructive contraction behavior.
### 6. PIVOT%
Determine how close the stock is to the breakout level.
### 7. RVOL
Before breakout, lower volume may indicate constructive Volume Dry-Up.
During breakout, rising RVOL can help confirm demand.
### 8. Review the Actual Chart
Always inspect:
* Base structure
* Pivot quality
* Price action
* Volume behavior
* Overhead supply
* Distance from moving averages
### 9. Define Entry, Stop and Position Size
The Radar is a screening tool.
Trade execution and risk management should be decided separately.
---
# Example Interpretation
Example:
**ADVANC**
SEPA = 91
TT = 7/7
VCP = 84
RSI(D) = 65
PIVOT% = -0.80%
RVOL = 0.55x
STATUS = READY
Interpretation:
ADVANC currently satisfies all Trend Template conditions.
Its quantitative VCP characteristics are constructive.
The price is approximately 0.8% below the Pivot.
Relative Volume is low, suggesting reduced trading activity ahead of the potential breakout.
The next step is to monitor whether price breaks the Pivot with expanding volume.
---
Another example:
**DELTA**
SEPA = 94
TT = 7/7
VCP = 88
RSI(D) = 72
PIVOT% = +0.50%
RVOL = 1.85x
STATUS = BREAKOUT
Interpretation:
The stock satisfies the Trend Template and VCP requirements.
Price has moved approximately 0.5% above the Pivot.
Relative Volume is approximately 85% above the 50-day average.
The system therefore classifies the stock as a potential BREAKOUT.
The trader should still evaluate the actual chart, technical stop level and risk/reward before taking a position.
---
# Limitations
Dr.Oat SEPA SET50 Radar is a **screening and decision-support tool**.
It does not evaluate:
* Earnings growth
* Revenue growth
* ROE
* Fundamental quality
* Valuation
* Company-specific news
* Market regime
* Foreign investor flow
* Earnings catalysts
* Portfolio-level risk
A READY or BREAKOUT signal should therefore not be interpreted as an automatic recommendation to buy.
The purpose of the Radar is to reduce the SET50 universe from 50 stocks to a much smaller list of technically interesting candidates that deserve further analysis.
---
# Core Workflow
**Scan → Rank → Focus → Review Chart → Manage Risk**
The goal is not to predict which stock will rise.
The goal is to systematically identify stocks showing the strongest combination of trend, contraction, proximity to a Pivot and volume behavior, then focus attention only on the highest-quality candidates.
Indicador

Dr.Oat SEPA Command # Dr.Oat SEPA Command Center V2
**Developed by Dr.Kor Endo**
Dr.Oat SEPA Command Center V2 is a technical analysis and stock-screening tool inspired by the principles of SEPA (Specific Entry Point Analysis), Stage 2 trend analysis, and volatility contraction concepts.
The indicator is designed to help traders identify stocks that are showing strong trend characteristics, constructive price contraction, proximity to a potential pivot, and breakout confirmation with volume expansion.
## Main Features
### 1. Stage 2 Trend Template
The script evaluates seven technical conditions using:
* SMA 50
* SMA 150
* SMA 200
* SMA 200 rising trend
* Distance above the 52-week low
* Proximity to the 52-week high
* Price position relative to SMA 50
A stock passing all seven conditions is considered to have passed the Stage 2 Trend Template.
### 2. Quantitative VCP Engine
The VCP Score is a quantitative proxy designed to identify characteristics associated with volatility contraction.
The score evaluates:
* Base depth
* Short-term range contraction
* Medium-term range contraction
* ATR contraction
* Volume dry-up
* Right-side price tightness
The VCP Score ranges from **0 to 100**.
Higher scores indicate a tighter and potentially more constructive setup.
### 3. Pivot Detection
The indicator automatically calculates an active pivot using the highest price of the previous configurable lookback period.
The current bar is excluded from the pivot calculation.
The dashboard also displays the percentage distance between the current price and the active pivot.
### 4. Setup Classification
The system classifies each stock into five possible states:
**BREAKOUT**
Trend Template passed, VCP conditions satisfied, price has moved above the pivot within the permitted breakout zone, and relative volume confirms the move.
**READY**
Trend Template passed, VCP conditions satisfied, and price is approaching the pivot from below.
**DEVELOPING**
The stock is in a valid Stage 2 trend, but the setup has not yet reached READY or BREAKOUT conditions.
**EXTENDED**
The stock has moved too far above the active pivot and may no longer offer an attractive entry point according to the configured maximum chase distance.
**SKIP**
The stock does not currently meet the required Stage 2 trend conditions.
Signal Codes:
* `0 = SKIP`
* `1 = DEVELOPING`
* `2 = READY`
* `3 = BREAKOUT`
* `4 = EXTENDED`
### 5. SEPA Score
The indicator calculates a composite **SEPA Score from 0–100** using:
* Trend Template — 30 points
* VCP characteristics — 30 points
* Volume characteristics — 15 points
* Pivot positioning — 15 points
* Breakout confirmation — 10 points
The score is intended as a ranking and screening tool rather than a standalone buy or sell signal.
### 6. Volume Analysis
The system evaluates both:
**Volume Dry-Up**
and
**Relative Volume (RVOL)**
Low relative volume during consolidation can help identify contraction, while expanding relative volume is used as confirmation during potential breakouts.
### 7. Daily RSI
Daily RSI is displayed for additional momentum context.
**Important:** RSI is informational only.
RSI is **not included in the Stage 2 Trend Template** and is **not included in the SEPA Score**.
### 8. Visual Dashboard
The on-chart dashboard provides a compact overview of:
* Current Status
* SEPA Score
* Trend Template Score
* VCP Score
* Daily RSI
* Active Pivot
* Distance to Pivot
* RVOL
* Base Depth
* Volume Dry-Up
* Range Contraction
* ATR Contraction
* Distance from 52-Week High
* Suggested Action
### 9. TradingView Pine Screener Support
The script exposes several numerical outputs that can be used as columns or filters within TradingView Pine Screener, including:
* SEPA Score
* Trend Template Score
* VCP Score
* Daily RSI
* Pivot Distance %
* RVOL
* Signal Code
* Base Depth %
* Volume10 / Volume50
* Trend Template PASS
For screening purposes, the **Daily timeframe (1D)** is recommended.
## Suggested Interpretation
Rather than treating the indicator as an automatic trading system, it can be used as a workflow:
**Market Universe → Stage 2 Trend → VCP → READY → BREAKOUT → Risk Management**
Stocks classified as READY may deserve closer monitoring around their pivot.
BREAKOUT indicates that the configured breakout and volume conditions have been satisfied.
EXTENDED is intended to warn against chasing a stock that has already moved significantly beyond its pivot.
## Important Notes
This indicator uses quantitative approximations of technical concepts such as VCP and SEPA.
Pattern recognition in financial markets is inherently subjective, and no numerical model can perfectly reproduce discretionary chart reading.
The tool should therefore be used as a **screening, ranking, and decision-support system**, not as a replacement for independent analysis.
Users are encouraged to evaluate:
* Overall market conditions
* Liquidity
* Fundamental quality
* Earnings growth
* Relative strength
* Risk/reward
* Position sizing
* Stop-loss strategy
before making any trading decision.
## Disclaimer
This script is provided for educational, research, and technical-analysis purposes only.
It does not constitute investment advice, financial advice, or a recommendation to buy or sell any security.
Past performance and historical technical patterns do not guarantee future results.
Users are solely responsible for their own trading and investment decisions.
---
**Developed by Dr.Kor Endo**
*Quantitative SEPA / Stage 2 / VCP Screening & Decision Support*
Indicador

MAD Volatility Trail [BackQuant]MAD Volatility Trail
Overview
MAD Volatility Trail is a robust trend-following overlay built from a rolling median and Median Absolute Deviation rather than a conventional moving average and standard deviation.
The indicator estimates a central price using the rolling median, measures how widely recent prices are distributed around that median using MAD, converts that dispersion into adaptive upper and lower bands, and then transforms those bands into one-sided trailing boundaries.
The result is a persistent bullish or bearish trend regime with:
A robust median-based center.
MAD-derived volatility bands.
Optional ATR minimum band width.
One-sided trailing support and resistance.
Optional median-slope confirmation.
Bullish and bearish regime flips.
Strength-reactive gradient and glow.
Post-flip bloom visualization.
Trend-coloured candles.
Signal and alert support.
The main distinction is statistical.
Most volatility trails rely on:
Means.
Standard deviation.
ATR.
MAD Volatility Trail instead uses:
Median.
Median Absolute Deviation.
Median-based statistics are substantially less sensitive to isolated extreme observations, making the framework useful when the user wants a trend structure that is less influenced by individual spikes or outliers.
Core concept
The indicator separates the problem into four stages:
Estimate a robust rolling center using the median.
Measure robust dispersion around that center using MAD.
Build upper and lower adaptive deviation bands.
Convert those raw bands into persistent trailing trend boundaries.
The resulting trail behaves conceptually like a volatility-aware regime filter, but its volatility estimate comes primarily from the empirical distribution of price around its median.
Why median instead of mean?
A conventional arithmetic mean is calculated by summing all observations and dividing by their count.
Every value directly affects the result.
This makes the mean sensitive to outliers.
Consider a simplified sample:
100
101
101
102
150
The extreme value at 150 pulls the arithmetic mean upward substantially.
The median is simply the middle observation after sorting:
Median = 101
The single extreme observation has much less influence.
This property is called robustness .
In markets, isolated large candles, gaps, liquidation events and temporary price spikes can distort mean-based statistics. Median-based calculations intentionally reduce the influence of those individual observations.
Rolling median
For each bar, the indicator collects the selected Source values across the MAD Lookback.
It then calculates the exact median of the available observations.
For an odd number of observations, the median is the middle sorted value.
For an even number, the median lies between the two central observations according to the median implementation.
The resulting value becomes the statistical center of the trail.
Unlike an EMA or RMA, the median is not recursively smoothed.
It is recomputed from the actual distribution of values inside the current rolling window.
Early-history behaviour
At the beginning of the chart, the script ignores unavailable historical values.
This means the first valid median calculations may use fewer observations than the full MAD Lookback until sufficient chart history has accumulated.
Once the complete lookback is available, the calculation uses the full selected window.
Median Absolute Deviation
After calculating the rolling median, the script measures the absolute distance of every observation from that median:
Absolute Deviation = |Value - Median|
It then takes the median of those absolute deviations:
MAD = Median(|Xi - Median(X)|)
This is the Median Absolute Deviation .
MAD measures the typical distance of observations from the median.
It serves a role similar to standard deviation, but the mathematics and statistical behaviour are different.
Why MAD is robust
Standard deviation squares deviations from the mean.
Large deviations therefore receive disproportionately large influence.
A single extreme observation can:
Move the mean.
Create a very large squared deviation.
Increase the final standard deviation substantially.
MAD does not square deviations.
It calculates absolute distance and then takes another median.
Extreme values therefore have limited ability to change the result unless enough of the underlying sample shifts.
This gives MAD a high resistance to outliers.
In practical chart terms, one unusual wick or shock candle is less likely to inflate the statistical width as dramatically as it could under a standard-deviation model.
MAD versus standard deviation
The two measures answer related but different questions.
Standard deviation
Measures squared dispersion around the arithmetic mean.
MAD
Measures median absolute dispersion around the median.
Standard deviation is highly useful when a mean-and-variance framework is desired.
MAD is useful when robustness to unusual observations is more important.
The indicator does not claim one is universally superior.
It intentionally uses MAD because the purpose is to construct a robust trend boundary.
MAD Scale
Raw MAD is not numerically identical to standard deviation.
Under a normal distribution, MAD is usually multiplied by a consistency factor of approximately 1.4826 when the goal is to make it comparable to standard deviation.
The indicator exposes this scaling directly:
Robust Deviation = Raw MAD × MAD Scale
The script default is 1.4655.
The input remains fully adjustable, so users who want the conventional normal-consistency approximation can set the factor near 1.4826.
This scale does not change the median itself.
It changes only the size of the deviation estimate used to build the bands.
Deviation Factor
After scaling MAD, the indicator applies the Deviation Factor:
MAD Width = Scaled MAD × Deviation Factor
This acts as the main sensitivity control.
Lower values:
Create narrower raw bands.
Place the trail closer to price.
Produce more frequent regime changes.
Higher values:
Create wider bands.
Require larger movement for reversals.
Produce more persistent trend states.
The MAD Scale and Deviation Factor both affect width, but they represent different concepts.
MAD Scale calibrates the statistical dispersion estimate.
Deviation Factor determines how much of that estimated dispersion is used for the trend envelope.
Raw MAD bands
The raw bands are:
Upper MAD Band = Median + Band Width
Lower MAD Band = Median - Band Width
Before trailing logic is applied, these bands can move freely upward or downward with:
The rolling median.
MAD dispersion.
Any active ATR floor.
These are statistical envelopes around the median.
They are not yet the final trend trail.
ATR Minimum Width
MAD can become extremely small when recent prices are tightly clustered.
In very low-dispersion conditions, this may place the raw bands extremely close to the median.
That can create excessive sensitivity to minor price fluctuations.
The optional ATR Minimum Width provides a secondary floor.
The script calculates:
ATR Floor = ATR(ATR Length) × ATR Floor Multiplier
When enabled:
Band Width = max(MAD Width, ATR Floor)
This means MAD remains the primary volatility model, but the bands cannot contract below the selected ATR-based threshold.
Why use an ATR floor?
MAD and ATR measure different aspects of market behaviour.
MAD measures:
Dispersion of the selected source around its rolling median.
ATR measures:
Bar-to-bar trading range.
Gaps relative to the previous close.
A market can have:
Low median dispersion.
But still produce meaningful intrabar range.
The ATR floor can prevent the trail from becoming unrealistically tight under those conditions.
ATR floor disabled
With ATR Minimum Width disabled, the entire structural width comes from:
MAD × MAD Scale × Deviation Factor
This produces the purest MAD-based version of the indicator.
ATR Length
ATR Length controls the volatility horizon used only for the optional minimum-width calculation.
It does not affect:
The rolling median.
Raw MAD.
Scaled MAD.
Note that the visual glow and bloom later in the script use a fixed ATR(14), separate from this ATR Length input.
Trailing bands
The raw MAD bands are converted into one-sided trails.
This is the stage that turns a statistical envelope into a persistent trend system.
Two independent trails are maintained:
Lower Trail.
Upper Trail.
Lower Trail
When the previous trigger remains above the previous Lower Trail, the new Lower Trail is:
max(Current Raw Lower Band, Previous Lower Trail)
This means the Lower Trail can:
Move upward.
Remain unchanged.
But cannot move downward while the condition remains active.
This creates a ratcheting support structure.
If the trigger falls below the prior Lower Trail, the trail is allowed to reset to the new raw lower band.
Upper Trail
When the previous trigger remains below the previous Upper Trail, the new Upper Trail is:
min(Current Raw Upper Band, Previous Upper Trail)
This means the Upper Trail can:
Move downward.
Remain unchanged.
But cannot move upward while the condition remains active.
This creates a ratcheting resistance structure.
If the trigger rises above the previous Upper Trail, the band can reset to the current raw upper value.
Why trailing the bands matters
A raw median-deviation envelope moves in both directions.
If those raw bands were used directly for trend changes:
The threshold itself could retreat toward price.
Small changes in median or MAD could produce unstable reversals.
The one-sided trail introduces hysteresis .
Hysteresis means that once a trend regime is established, the threshold required to reverse it remains on the opposing side.
This reduces the tendency to flip repeatedly around the rolling median.
Flip Trigger
The user can choose which series is used when evaluating trail breaks:
Close.
Source.
Close
Uses the candle close regardless of which series is used for the MAD calculation.
This is the conventional option.
Source
Uses the selected Source input.
For example, if HLC3 is selected as the Source:
The median is calculated from HLC3.
MAD is calculated from HLC3.
The trail can also be triggered by HLC3.
This keeps the center, dispersion and reversal trigger based on the same source.
Initial trend state
The trend begins in a neutral state.
Once a valid rolling median is available:
Trigger at or above Median = bullish initialization.
Trigger below Median = bearish initialization.
This initial assignment is not treated as a bullish or bearish flip.
Flip signals occur only after the indicator has already established one regime and later transitions into the opposite regime.
Bullish flip
A bullish regime change requires:
Trigger to move above the Upper Trail.
Current trend not already bullish.
Optional bullish median-slope confirmation to pass.
Once confirmed:
Trend becomes bullish.
The Lower Trail becomes the active trend boundary.
A bullish signal can be displayed.
Bearish flip
A bearish regime change requires:
Trigger to move below the Lower Trail.
Current trend not already bearish.
Optional bearish median-slope confirmation to pass.
Once confirmed:
Trend becomes bearish.
The Upper Trail becomes the active boundary.
A bearish signal can be displayed.
Active trend trail
The final displayed trend boundary depends on the regime:
Bullish = Lower Trail.
Bearish = Upper Trail.
This means the line automatically moves to the opposite side of price when a complete regime change occurs.
Median Slope Confirmation
The optional Median Slope Confirmation adds a directional requirement to trend reversals.
For a bullish flip:
Current Median > Median from Slope Lookback bars ago
For a bearish flip:
Current Median < Median from Slope Lookback bars ago
This requires the robust statistical center itself to move in the direction of the proposed new trend.
Why confirm with median slope?
Price can briefly cross a trail while the underlying median remains flat or continues moving in the opposite direction.
Slope confirmation can reject some of these events.
For example:
A bullish trail break with a still-falling median may represent:
A temporary rebound.
A liquidity sweep.
Noise inside a larger bearish structure.
Requiring the median to rise adds another layer of confirmation.
The trade-off is lag.
A genuine reversal may cross the trail before the rolling median has clearly changed direction.
Slope Lookback
Slope Lookback controls how far back the median is compared.
Lower values:
Respond more quickly.
Require only a very local median turn.
Higher values:
Require a broader directional shift.
Produce stronger confirmation.
Can delay reversals.
This same lookback is also used in the visual slope-strength calculation even when slope confirmation itself is disabled.
Break Trail On Flips
When enabled, the displayed trail is temporarily hidden on the actual regime-flip bar.
This creates a visual break between:
The previous regime’s trail.
The new regime’s trail.
Without the break, the plotting engine can draw a connecting segment from one side of the market to the other.
That connection has no analytical meaning.
Break Trail On Flips affects visualization only.
It does not affect:
Trend state.
Raw bands.
Trail calculations.
Signals.
Robust trend structure
The complete structural model can therefore be summarized as:
Rolling Median determines robust center.
MAD determines robust dispersion.
MAD Scale calibrates the dispersion.
Deviation Factor determines band distance.
Optional ATR floor prevents excessive compression.
Raw bands form the initial envelope.
Ratchet logic creates trailing support and resistance.
Opposite-trail breaks determine regime changes.
Optional median slope confirms those reversals.
This combination is what separates the indicator from simply plotting median ± MAD.
Visual strength model
The script calculates a separate Trend Strength value used only to control the presentation of the gradient and glow.
It does not alter:
Trend direction.
Trail levels.
Flip conditions.
Trend Strength combines:
Price distance from the active trail.
Absolute rolling-median slope.
Distance Strength
The script first measures:
Trail Distance = |Close - Active Trail|
This is normalized by the current band width.
The normalized distance is capped when price reaches twice the active band width away from the trail.
Conceptually:
Close to trail = low distance strength.
Far from trail = high distance strength.
This reflects how separated price is from the current structural boundary.
Slope Strength
The indicator also measures:
|Current Median - Median |
This value is normalized by the current band width and capped at one.
The purpose is to compare median movement against the current statistical width.
A steep median relative to the band width produces stronger visual slope strength.
Combined Trend Strength
The final visual strength is:
70% Distance Strength.
30% Median Slope Strength.
and is capped at one.
The distance component receives greater weight because the visual system places more emphasis on how strongly price is separated from the active trail.
Again, this number is not a probability, forecast or additional signal.
It is a visual intensity measure.
Layered gradient
The area between the active trail and current close is divided into several intermediate levels.
The script creates reference points approximately:
15% of the distance from trail to price.
35%.
60%.
82%.
Then the final segment to price.
These create five layered gradient regions.
The layers become progressively more transparent as they move away from the trail.
This gives the trail visual depth without turning the entire area between price and structure into one solid block.
Gradient direction
The geometry of the gradient is determined by whether close is above or below the active trail.
The colour itself comes from the current bullish or bearish trend regime.
The gradient therefore visualizes:
The active trend colour.
The distance between price and trail.
The relative strength of the trend visualization.
The gradient does not determine the regime.
Trend-strength gradient response
Higher Trend Strength reduces transparency in several layers.
This makes the ribbon more visible when:
Price is strongly separated from the trail.
The rolling median is moving meaningfully.
Lower strength produces a softer appearance.
This allows the visual presentation to communicate more than simple bullish or bearish state.
Flip bloom
The indicator includes a temporary post-flip bloom.
The bloom is derived from the number of bars elapsed since the most recent bullish or bearish transition.
Importantly, in the current implementation the bloom begins after the flip bar:
Flip bar: no bloom boost.
1 bar after flip: maximum bloom.
2 bars after flip: reduced bloom.
3 bars after flip: smaller residual bloom.
Afterward: bloom disappears.
The relative bloom strengths are:
1.00
0.55
0.25
This emphasizes the early bars following a newly confirmed regime change.
Why bloom after the flip?
The flip itself can optionally contain a break in the trail.
Applying the bloom to the following bars emphasizes the newly established active trail rather than drawing a large effect around a temporarily hidden flip point.
The bloom is cosmetic.
It does not modify the underlying calculations.
Trail glow
The active trail can also display a persistent glow.
Glow width is based on:
ATR(14) × a factor that increases with Trend Strength
This ATR(14) is fixed for visualization and is independent of the user-selected ATR Length used by the optional minimum-width floor.
The glow therefore becomes slightly wider as visual trend strength increases.
Two layers are used:
A tighter inner glow.
A broader outer glow.
The inner glow responds more strongly to Trend Strength and post-flip bloom.
Rolling Median display
The rolling median can be displayed independently from the trail.
This is useful for studying the difference between:
The current robust center.
The statistical raw bands.
The ratcheting trend trail.
During a bullish regime, the active Lower Trail can remain below the rolling median.
During a bearish regime, the active Upper Trail can remain above it.
The median is not itself the trend signal.
Raw MAD Bands display
The raw upper and lower MAD bands can also be shown.
These lines make it easier to see how the trailing logic differs from the unrestricted statistical envelope.
Raw bands:
Can move in either direction.
Trailing bands:
Can ratchet in only one direction while their persistence condition remains active.
The gap between raw and trailing levels illustrates the hysteresis introduced by the trend logic.
Trend candles
The script can redraw candles on the main chart using the active trend colour.
Bullish regime:
Uses the selected Bullish colour.
Bearish regime:
Uses the selected Bearish colour.
The candle colour represents the persistent trail regime, not whether each individual candle closed higher or lower.
A bearish candle can therefore remain bullish-coloured while the broader MAD Trail regime remains bullish.
Signal markers
Bullish and bearish markers appear only on complete transitions between established regimes.
A bullish marker requires:
Previous trend = bearish.
Current trend = bullish.
A bearish marker requires:
Previous trend = bullish.
Current trend = bearish.
Initial trend assignment does not generate a flip marker.
How to interpret the indicator
Bullish regime
A bullish state means price has previously broken above the opposing Upper Trail and the Lower Trail is now active.
The Lower Trail can be interpreted as:
Dynamic trend support.
A structural invalidation reference.
A trailing regime boundary.
Bearish regime
A bearish state means price has broken below the opposing Lower Trail and the Upper Trail is active.
The Upper Trail can be interpreted as:
Dynamic resistance.
A bearish invalidation reference.
A trailing regime boundary.
Price close to trail
When price approaches the active trail:
Visual distance strength decreases.
The gradient becomes softer.
The market is closer to the regime boundary.
This does not guarantee a reversal.
A healthy trend can repeatedly retest its active trail.
Price far from trail
When price moves substantially away:
Distance Strength rises.
The visual effect becomes stronger.
This indicates greater separation from the active structural boundary.
It should not automatically be interpreted as a better entry.
A market can be strongly extended and simultaneously close to exhaustion.
Median and trail rising together
During a bullish regime, a rising median combined with a rising Lower Trail indicates:
The robust center is moving upward.
The structural support boundary is also advancing.
This represents cleaner directional alignment.
Median flattening while trail remains bullish
The persistent regime can remain bullish while the median begins flattening.
This indicates:
The trend has not yet been invalidated.
But the robust center is no longer advancing as strongly.
The visual slope-strength component may weaken under this condition.
Raw band expansion
If MAD increases:
Raw bands widen.
Trail reset levels can move farther away.
This means recent source values are becoming more dispersed around the median.
Raw band contraction
If MAD falls:
The raw envelope tightens.
If the ATR floor is disabled, the structure can become substantially narrower.
If the ATR floor is enabled, contraction stops once the selected minimum width is reached.
How to use the indicator
1. Trend regime filter
Use the persistent trail state as directional context:
Bullish trail regime = prioritize long-side setups.
Bearish trail regime = prioritize short-side setups.
The trail does not define a complete trading system by itself.
2. Pullback structure
During a bullish regime, the Lower Trail can provide a dynamic reference for deeper pullbacks.
During a bearish regime, the Upper Trail can provide a reference for rallies.
The farther price moves from the trail, the greater the current structural separation.
3. Regime transitions
Bullish and bearish flips identify moments when price has crossed completely through the opposing robust-deviation trail.
These may be used as:
Trend-change alerts.
Confirmation for another entry method.
Potential exit conditions.
4. Median confirmation
Users who want more selective signals can enable Median Slope Confirmation.
This can be especially useful when:
The market is choppy.
Price frequently sweeps through statistical boundaries.
5. Pure robust-volatility mode
Disable the ATR Minimum Width to make band width depend only on:
Rolling MAD.
MAD Scale.
Deviation Factor.
This produces the purest version of the model.
6. Hybrid robust-volatility mode
Enable ATR Minimum Width when the MAD channel becomes too narrow for the instrument or timeframe.
This preserves MAD as the primary engine while adding a conventional range-based safety floor.
Input guide
Source
Series used for the rolling median and MAD calculation.
MAD Lookback
Controls the number of observations used for the rolling median and dispersion estimate.
Shorter values adapt faster.
Longer values create a broader and more stable distribution.
MAD Scale
Multiplier applied directly to raw MAD.
The commonly cited normal-distribution consistency factor is approximately 1.4826; the script default is 1.4655.
Deviation Factor
Controls the final width of the MAD envelope.
ATR Minimum Width
Prevents the active band width from falling below an ATR-derived floor.
ATR Length
Controls the ATR used by the optional floor.
ATR Floor
Controls the minimum width as a multiple of ATR.
Median Slope Confirmation
Requires the rolling median to move in the direction of a proposed trend flip.
Slope Lookback
Controls how far back the current median is compared.
It also influences the visual slope-strength calculation.
Flip Trigger
Selects Close or Source for trail-break detection.
Break Trail On Flips
Creates a visual discontinuity on transition bars.
How this differs from a standard Supertrend
A conventional Supertrend generally uses:
A price midpoint such as HL2.
ATR as the full band-width model.
MAD Volatility Trail instead uses:
Rolling median as its center.
Median Absolute Deviation as its primary width.
ATR only as an optional minimum floor.
The trail mechanics are conceptually related, but the statistical foundation is different.
How this differs from Bollinger Bands
Bollinger Bands normally use:
A moving average.
Standard deviation.
Symmetrical raw bands.
MAD Volatility Trail uses:
Rolling median.
Median Absolute Deviation.
One-sided trailing bands.
Persistent trend-state logic.
Bollinger Bands are primarily a statistical envelope.
MAD Volatility Trail converts its robust statistical envelope into a trend-regime system.
How this differs from median ± MAD alone
A simple median-MAD indicator would plot:
Median.
Median + MAD width.
Median - MAD width.
Those bands would move freely.
This indicator adds:
Ratchet logic.
Persistent bullish/bearish state.
Opposite-trail break conditions.
Optional median-slope confirmation.
Signals and alerts.
The raw statistical model is therefore only the first stage.
MAD versus ATR
ATR measures the size of trading ranges.
MAD measures dispersion of the selected source around its median.
They can behave very differently.
For example:
A volatile but mean-reverting market can have large ATR with relatively controlled median dispersion.
A persistent directional displacement can produce increasing MAD even if individual candle ranges are moderate.
The optional floor allows both concepts to coexist without replacing the MAD foundation.
Robust statistics and financial markets
Financial return and price distributions frequently contain:
Outliers.
Large jumps.
Skew.
Fat tails.
Mean-and-standard-deviation models remain extremely useful, but robust alternatives can provide different information when unusual observations are present.
Median and MAD belong to a family of robust statistical tools designed to reduce sensitivity to extreme sample values.
This does not make the resulting indicator immune to market shocks.
If enough of the rolling window moves, the median and MAD will also move.
The advantage is primarily that one isolated observation has less influence.
Strengths
Uses an exact rolling median.
Uses exact Median Absolute Deviation rather than an approximation.
More resistant to isolated outliers than mean/standard-deviation envelopes.
Provides a configurable MAD scale.
Supports a pure MAD or MAD-plus-ATR hybrid width.
Converts robust statistics into persistent trend boundaries.
Uses one-sided trail logic to reduce rapid regime switching.
Provides optional median-direction confirmation.
Separates signal logic from visual strength.
Includes dynamic gradient, glow and post-flip visualization.
Exposes raw MAD, scaled MAD, active band width and Trend Strength in the Data Window.
Limitations
The indicator is reactive rather than predictive.
Robust statistics do not eliminate whipsaws.
A very short MAD Lookback can still react sharply.
A very long lookback can delay adaptation to new regimes.
Median calculations can remain unchanged across several bars and then move discretely as the rolling sample changes.
Higher Deviation Factors reduce reversals but increase confirmation lag.
The ATR floor changes the model from pure MAD dispersion to a hybrid MAD/ATR structure.
Median Slope Confirmation can reject false breaks but also delay genuine reversals.
Extreme readings in the visual-strength system are not probabilities of continuation.
Glow and bloom are cosmetic and should not be treated as separate signals.
Computational considerations
Unlike many moving averages, the exact rolling median and MAD calculations require the script to build and process the values inside the selected window.
For each bar:
The rolling source sample is collected.
Its median is calculated.
Absolute deviations from that median are calculated.
A second median is calculated from those deviations.
Larger MAD Lookbacks therefore require more work than a simple recursive EMA or ATR calculation.
This is the cost of calculating the robust statistics directly.
Causality and live-bar behaviour
The indicator uses current and historical values without intentional future-looking references.
On completed historical bars, the model is causal.
On a live unfinished bar:
The Source can change.
The current rolling median can change.
MAD can change.
Raw bands can change.
A trail break can appear or disappear.
Users who require confirmed regime changes should evaluate signals at bar close.
Data Window
The indicator exposes four useful diagnostic values.
Raw MAD
The unscaled median absolute deviation.
Scaled MAD
Raw MAD multiplied by the selected MAD Scale.
Active Band Width
The actual band width after:
MAD scaling.
Deviation Factor.
Optional ATR minimum floor.
Trend Strength
The visual-strength score expressed from approximately 0 to 100.
This is calculated from trail distance and median movement.
It is not part of the trend-flip logic.
Alerts
The indicator includes:
MAD Trail Bullish: established bearish regime changes to bullish.
MAD Trail Bearish: established bullish regime changes to bearish.
MAD Trail Flip: either regime transition occurs.
Summary
MAD Volatility Trail builds a trend-following regime from robust statistics.
The calculation begins with an exact rolling median of the selected Source.
Rather than measuring dispersion with standard deviation, the script calculates the Median Absolute Deviation:
MAD = Median(|X - Median(X)|)
The raw MAD is scaled and multiplied by a configurable Deviation Factor to create the statistical width around the rolling median.
The resulting raw upper and lower bands are:
Median + Band Width.
Median - Band Width.
An optional ATR minimum floor prevents these bands from becoming excessively narrow during low-dispersion conditions.
The raw envelope is then transformed into one-sided trailing boundaries.
The Lower Trail can ratchet upward while price remains above it, while the Upper Trail can ratchet downward while price remains below it.
These trails create hysteresis and form the actual regime-switching structure.
A bearish regime turns bullish only when the selected trigger breaks above the opposing Upper Trail, optionally while the rolling median itself is rising.
A bullish regime turns bearish only when the trigger breaks below the Lower Trail, optionally while the median is falling.
The active Lower Trail is displayed during bullish regimes and the active Upper Trail during bearish regimes.
A separate visual-strength model measures price-to-trail distance and median slope relative to the active band width. That score controls gradient and glow intensity but does not alter signals.
The result is a robust alternative to conventional mean-, standard-deviation- and ATR-centered trend trails.
Rather than allowing individual extreme prices to dominate its statistical center and dispersion estimate, MAD Volatility Trail uses the median twice: once to define the center of the distribution and again to define the typical absolute distance from that center.
This creates a trend framework designed around robust location, robust dispersion and persistent trailing structure .
Indicador

Indicador

FW_MLA+ Key Trading Levels Pro
A+ Key Trading Levels Pro is an intraday trading indicator designed to give traders a clean, quick view of important support/resistance levels and overall directional alignment.
The indicator automatically plots several commonly watched market levels directly on the chart:
Previous Day High and Low
Previous Week High and Low
Premarket High and Low
First 5-Minute High and Low
Each level extends across the chart and can be customized by color, thickness, line style, label size, and label transparency. Price labels can also display the exact dollar value of each level for faster chart reading.
The indicator also includes a compact A+ Trade Checklist designed to help traders quickly evaluate bullish or bearish alignment without cluttering the chart.
The checklist evaluates:
Previous Day range
Premarket range
Previous Week range
First 5-Minute range
VWAP
1-Minute 9 EMA
Bullish conditions display in green, bearish conditions display in red, and neutral or inside conditions remain neutral.
When all six bullish criteria align, the checklist displays:
A+ CALL
When all six bearish criteria align, the checklist displays:
A+ PUT
The purpose of the checklist is not to generate automatic trade entries, but to provide a fast visual summary of market structure and directional confluence.
Key Features
Automatic intraday support and resistance levels
Previous day and previous week levels
Premarket high and low
Opening 5-minute range
Full-width horizontal levels
Exact price labels
Transparent label option
Customizable colors and line styles
Compact A+ checklist
Bullish and bearish directional scoring
VWAP confirmation
1-minute 9 EMA confirmation
Designed for intraday trading on liquid stocks and ETFs
Suggested Use
This indicator is primarily intended for intraday traders looking for confluence around major market levels. It can be used to quickly identify whether price is trading above, below, or inside important reference areas before considering a trade setup.
For example, a trader may use an A+ CALL reading as confirmation that multiple bullish conditions are aligned, while an A+ PUT reading indicates bearish alignment.
It should be used alongside proper risk management, price action, volume, market context, and the trader’s own strategy.
Important Note
The first 5-minute levels are based on the opening 9:30 AM–9:35 AM Eastern Time candle. Premarket levels are calculated from the 4:00 AM–9:30 AM Eastern Time session, so extended-hours data should be enabled when applicable.
This indicator is for informational and educational purposes only and does not constitute financial advice or guarantee future results.
For the TradingView title, I’d use:
A+ Key Trading Levels Pro | PDH/PDL + PM + 5M + Checklist
And for the short description:
Clean intraday key levels with previous day/week, premarket, opening 5-minute range, VWAP, 9 EMA, and a compact bullish/bearish A+ checklist. Indicador

StormCore Engine: OTE, Alligator & Volume ProfileThe StormCore Engine is a modular, all-in-one technical analysis tool designed to consolidate three powerful trading methodologies into a single, highly optimized script. By combining Optimal Trade Entry (OTE) zones, a modernized Williams Alligator, and a dynamic Volume Profile with node detection, this engine helps traders identify liquidity zones, trend alignments, and key volume clusters without exhausting indicator limits on the chart.
This script is built with a modular architecture, meaning every core component can be toggled on or off via a "Master Toggle" in the settings, keeping your workspace clean and reducing CPU load when specific tools are not in use.
### Core Modules
1. Optimal Trade Entry (OTE)
This module automatically plots Fibonacci retracement levels (including the 62% and 79% "sweet spot" boxes) anchored either to the visible chart area, custom date ranges, or higher timeframe swings.
- Features fractal detection to identify potential market structure shifts.
- Customizable Fibonacci extensions for dynamic profit-taking targets.
2. Super Alligator
A modernized take on the classic Bill Williams Alligator indicator. It utilizes SMMA-based Jaw, Teeth, and Lips to gauge trend direction and momentum.
- Signal Generation: Prints explicit Buy/Sell markers only when the "mouth" is fully open and the gap between the close price and the Lips exceeds a user-defined percentage.
- Trend Filters: Includes optional SMA 200 and VWAP filters to ensure signals only fire in the direction of the macro trend or intraday fair value.
3. Volume Profile & Node Detection
Calculates the trading volume at specific price levels over a user-defined lookback period.
- Displays the Point of Control (POC) and Value Area High/Low (VAH/VAL).
- Node Detection Algorithm: Highlights high-volume Peaks and low-volume Troughs within the profile, which often act as significant support and resistance barriers.
### Practical Application (How to Use)
A high-probability setup occurs when multiple modules align:
- Wait for the price to retrace into the OTE 70% box.
- Check if this zone coincides with a Volume Profile Peak (indicating strong historical liquidity).
- Await a confirming signal from the Super Alligator (e.g., a Buy triangle firing above the VWAP filter) to execute the trade.
All modules are calculated independently but rendered cleanly to avoid chart clutter. Adjust the settings for your specific asset and timeframe.
Developed by Andy Storm | AI-StormCore. Indicador

Daybreak Strategy [Achira Meegasthanne]Daybreak Strategy
Daybreak Strategy is an Opening Range Breakout (ORB) strategy designed to capture potential directional moves based on the high and low of the 9:00 opening candle on the 1-hour timeframe.
The strategy places breakout stop orders above and below the opening range, with the entry distance dynamically adjusted using ATR and the selected Sensitivity.
🔹 KEY FEATURES
⏱️ 1-HOUR TIMEFRAME
The strategy is specifically designed to operate on the 1-hour timeframe .
The opening range is taken from the 9:00 candle, making the 1H timeframe important for the intended ORB calculation.
📊 OPENING RANGE BREAKOUT
The strategy records:
• Opening Range High
• Opening Range Low
• Opening Range Range
• Opening Range Midpoint
These levels are displayed in the on-chart dashboard and used to establish potential breakout entries.
🟢 LONG BREAKOUT
A Long stop order is placed above the Opening Range High.
The entry level is calculated using:
Opening Range High + ATR × Sensitivity
This allows the breakout distance to adapt to current market volatility.
🔴 SHORT BREAKOUT
A Short stop order is placed below the Opening Range Low.
The entry level is calculated using:
Opening Range Low − ATR × Sensitivity
This provides a volatility-adjusted downside breakout level.
⚙️ CUSTOMIZABLE SETTINGS
The strategy provides several user-controlled settings:
• Sensitivity
• Take Profit
• Stop Loss
• Up Color
• Down Color
• Dashboard
• Dashboard Size
• Dashboard Color
The default Sensitivity is 0.5 .
🎯 TAKE PROFIT & STOP LOSS
Each Long and Short entry uses predefined Take Profit and Stop Loss values.
Default settings:
• Take Profit = 40 ticks
• Stop Loss = 25 ticks
These values can be adjusted according to the user's preferred testing configuration.
📈 ATR-BASED ENTRY
The strategy uses a 14-period ATR to dynamically calculate the distance between the opening range and the breakout entry level.
This allows the entry distance to respond to changing market volatility.
🌅 DAILY OPENING RANGE
The opening range is reset at the beginning of each new trading day.
The 9:00 candle high and low are captured once per day and used as the day's Opening Range levels.
🔄 ONE-TIME ORDER PLACEMENT
The strategy places the Long and Short breakout orders only once after the Opening Range has been established.
This prevents repeated placement of the same breakout orders during the session.
⏰ END-OF-DAY ORDER CANCELLATION
Untriggered Long and Short stop orders are cancelled during the defined end-of-session period around 21:30–22:00 .
This prevents remaining breakout orders from continuing indefinitely after the intended trading session.
📍 VISUAL BREAKOUT LEVELS
The Opening Range High and Opening Range Low are plotted on the chart as step-style levels.
• Buy Stop level = Opening Range High
• Sell Stop level = Opening Range Low
These levels make the daily breakout structure easy to identify visually.
📋 TRADING DASHBOARD
The strategy includes an on-chart dashboard displaying important Opening Range information.
The dashboard can show:
• Current Bias
• Opening Range High
• Opening Range Low
• Opening Range Range
• Opening Range Mid
The dashboard also displays a message when the strategy is not being used on the 1-hour timeframe.
🧭 MARKET BIAS
The strategy determines a directional bias from the 9:00 opening candle.
The dashboard displays either:
Long
or
Short
based on the opening candle's relationship between its Close and Open.
📊 PERFORMANCE STATISTICS
The strategy includes a statistics dashboard containing:
• Total Trades
• Win Rate
• Starting Capital
• Ending Capital
• Average Win
• Average Loss
• Profit Factor
• Max Runup
• Return
• Max Drawdown
These statistics provide a quick overview of the strategy's historical backtest performance.
💰 PROFIT & LOSS ANALYSIS
The performance section uses the strategy's calculated trading results to display:
• Net Profit
• Gross Profit
• Gross Loss
• Winning Trades
• Losing Trades
• Return Percentage
• Profit Factor
This allows users to evaluate the historical performance directly from the chart.
🧠 HOW IT WORKS
1. Detect New Trading Day
The strategy resets the Opening Range variables at the beginning of each new day.
2. Capture the 9:00 Candle
The high and low of the 9:00 candle are recorded as the day's Opening Range High and Opening Range Low.
3. Calculate ATR
A 14-period ATR is used to measure current market volatility.
4. Calculate Breakout Levels
Long and Short stop orders are positioned around the Opening Range using ATR multiplied by Sensitivity.
5. Wait for Breakout
A Long position can be triggered when price reaches the upper breakout level.
A Short position can be triggered when price reaches the lower breakout level.
6. Apply Risk Management
Take Profit and Stop Loss values are applied to the corresponding position.
7. Cancel Remaining Orders
Untriggered breakout orders are cancelled during the defined end-of-day session.
8. Display Performance
The dashboard provides Opening Range information and historical strategy statistics.
📌 CORE CONCEPT
9:00 Opening Range → ATR Adjustment → Breakout Stop Orders → Take Profit / Stop Loss → End-of-Day Management
⚠️ IMPORTANT DISCLAIMER
This strategy is provided for market analysis, backtesting, and educational purposes .
Historical strategy performance does not guarantee future results.
Backtest statistics such as Win Rate, Profit Factor, Return, and Max Drawdown can vary significantly depending on the market, timeframe, trading session, and selected inputs.
Always perform your own analysis, apply proper risk management, and thoroughly test the strategy before using it with real capital.
Capture the opening range. Wait for the breakout. Let volatility define the entry.
Estrategia

Indicador

Volatility Expansion Score (0-4) v2.2 [TotoMazter]Volatility Expansion Score (0-4)
WHAT IT IS
This indicator detects one specific market state: a compressed market whose calm is starting to break. It scores every closed bar from 0 to 4, one point per condition:
Compressed regime — ATR% in the lower tercile of its own last 500 bars
Expansion starting — ATR% higher than on the previous bar
Narrow Bollinger Bands — band width in the lower tercile of its last 120 bars
Volume waking up — tick volume above its 100-bar mean (z-score > 0)
Score 3 (orange) is the signal threshold; score 4 (red) is a full trigger. Everything is self-normalized (rolling percentiles and z-scores, no absolute levels), so the indicator needs no recalibration across price regimes: in our research it behaved the same with gold at 1,800 and at 4,800.
WHAT IT DOES NOT DO — READ THIS FIRST
It does NOT predict direction. In the research program behind this script, the directional question was tested three separate ways on 14 years of XAUUSD minute data — 132 technical variables, a dedicated 40-feature study (intraday synthetic dollar index, gold/silver lead-lag, compression context, M1 microstructure, path features), and real aggressor order flow from COMEX gold futures — and all three came back null. A 4/4 score says "an impulse is more likely than usual", never which way. Any use of this tool as a bullish/bearish signal is outside what was validated.
It also does not promise big moves in dollar terms. The signal fires when ATR is compressed (about 0.83x its normal level), and the subsequent move measured in % of price is slightly SMALLER than average (about 0.97x). What increases is the move relative to current volatility. If you size stops and targets in ATR units (R multiples), the historical edge is real; if you think in dollars, there is none.
MEASURED RESULTS (all historical, XAUUSD 1h, 2013-2026, ~79,000 bars)
Out-of-sample validation on a pre-registered 2023-2026 holdout, opened once: bars with score >= 3 were followed by a 2-ATR impulse 1.95x more often than the base rate (95% CI 1.76-2.03). Score = 4: 2.73x (CI 2.09-2.94).
Honest base rates: with a ~5% base impulse rate, 2.7x lift means roughly 13-14% of full triggers are followed by an impulse. Most signals are NOT followed by a large move. Position sizing must assume this.
The follow-through advantage, measured in ATR units and controlled for time of day, is about x1.106, favorable in all 21 measurable hourly buckets and in 13 of 14 years. Without the time-of-day control the raw number is x1.139 — the control matters, and the built-in table applies it for you.
Where signals cluster on gold: the New York morning (13:00-15:00 UTC) and the London open (08:00-09:00 UTC). The most volatile hour of gold's day in this dataset is 14:00 UTC (about 1.8x the daily average hourly range).
STOCKS (NVDA, AMD, TSLA — high-volume, high-volatility test set)
The signal transfers, but with roughly half the strength: x1.04-1.08 in ATR units after the same time-of-day control (below 1 in dollar terms). Three structural rules came out of that validation and are enforced by the script's guards:
Do not use 5-minute charts: intraday volume is U-shaped and the signal degenerates into a closing-auction detector (a fake x1.68 "edge" came entirely from the last 30 minutes of the session).
Do not use 1-hour charts on RTH equities: the session's partial bar has a smaller range by construction and concentrates signals. The script excludes partial bars automatically (marked with a dot).
Use 15m or 30m, and keep the characterization horizon inside the session (H <= 12 on 15m, H <= 11 on 30m). Windows containing long closures (overnight gaps, weekends) are excluded by the gap guard.
Earnings are not the driver: excluding extreme-gap days does not change the result.
THE BUILT-IN CHARACTERIZATION TABLE
The table answers, for THE SYMBOL AND TIMEFRAME ON YOUR CHART, whether the signal has historically preceded larger moves, using three measures: raw MFE in ATR (inflated by the denominator and by time of day — reference only), MFE in % of price (immune to the denominator), and the intra-hour advantage (computed within each hour of day, then aggregated — the one that decides, highlighted in yellow). It also reports the ATR-at-signal ratio (~0.8 expected) and the maximum hourly concentration of signals (if it exceeds ~8 pp, part of what you see is the clock, not the market). If it says "short sample", the guards are refusing to output a number that cannot be measured cleanly on your chart — that is a feature.
WHY IT IS ORIGINAL
Rolling percentiles converted to the exact convention of pandas rolling rank, so the script reproduces the research module it was ported from (practical parity check: on XAUUSD 1h, score >= 3 should fire on roughly 17% of bars, score = 4 on roughly 3.7%).
Wilder ATR (RMA), population standard deviations, closed-bar evaluation with alerts on bar close, and an entry reference at the next bar's open — no repainting of the validated signal.
Session guards: partial-bar exclusion (any intraday bar shorter than its timeframe) and a data-measured gap guard (characterization windows may not contain a closure longer than 3x the timeframe), so equity overnight gaps and weekends do not contaminate the statistics while gold's 1-hour daily break does not block them.
A self-auditing characterization table with denominator-aware and time-of-day-controlled measures. It will happily tell you the signal does NOT work on your chart.
SETTINGS
Signal windows (14 / 500 / 120 / 100) and tercile cuts are the canonical values of the validated module; changing them invalidates every reference number above. "Confirm on bar close" keeps the indicator inside its validated definition. The alert message includes the score breakdown and states that the entry reference is the next bar's open. The characterization table can be displayed in English or Spanish via the "Table language" setting.
LIMITATIONS
All figures are historical measurements from the research program described above; past behavior does not guarantee future behavior. The stock characterization is in-sample (no reserved validation window). This is a statistical tool for regime awareness — when to pay attention — not a trading system: it provides no direction, no entries, and no risk management. Indicador

DNSE VN301!, SMA ADX/DI Trend Following Strategy"SMA ADX DI Trend Following" is a trend-following strategy designed to identify and capture directional price movements by combining SMA slope analysis with ADX trend-strength confirmation and DI directional signals. The strategy uses SMA(89) to determine the primary trend direction, while ADX(14) confirms that the market has sufficient trend strength and DI identifies whether bullish or bearish pressure is dominant.
By requiring agreement between trend direction, trend strength, and directional momentum, the strategy seeks to filter out weak or unclear market conditions while participating in stronger intraday trends. An optional SMA(200) trend filter provides additional broader-trend confirmation. The strategy also includes configurable stop loss, take profit, trading session filters, signal confirmation settings, and automatic end-of-session position closure for disciplined risk management.
Strategy settings and configuration:
Chart timeframe: recommended 15-minute chart
Position size: 3 contracts
Signal SMA length: 89
SMA slope lookback: 5
ADX length: 14
ADX threshold: 20
DI filter: On / Off
New signal only: On / Off
SMA trend filter: disabled by default
Trend filter SMA length: 200
Stop loss: 10 points
Take profit: 20 points
Take profit: On / Off
Time filter: On / Off
Trading session: 09:00 – 14:30
Trade direction: Long / Short / Both
Signal arrows: disabled by default
Default script settings:
The strategy uses a signal SMA with a length of 89 to identify the main market direction. Instead of comparing the current SMA with only the previous candle, the bot uses a slope lookback of 5.
This means the bot compares the current SMA with the SMA value from 5 candles ago. If the current SMA is higher than the SMA from 5 candles ago, the SMA is considered rising. If the current SMA is lower than the SMA from 5 candles ago, the SMA is considered falling.
This method helps reduce noise on the 1-minute timeframe. The bot does not enter a trade just because the SMA moves slightly within one candle.
ADX(14) is used to confirm trend strength. When ADX is above 20, the market is considered to have enough trend strength for trading signals to be considered.
DI is used to confirm trend direction. When +DI is above -DI, buying pressure is dominant. When -DI is above +DI, selling pressure is dominant.
When the DI filter is enabled, the bot only allows Long trades when +DI > -DI. It only allows Short trades when -DI > +DI.
The “New signal only” option helps reduce repeated entries in the same signal state. When this option is enabled, the bot only enters when a new Long or Short state appears.
The SMA(200) trend filter is disabled by default. Users can enable this filter if they want stricter alignment with the larger trend.
When the SMA(200) trend filter is enabled, the script only allows Long trades when SMA(200) is rising and only allows Short trades when SMA(200) is falling.
Entry and exit rules:
Long entry:
Signal SMA is rising based on the 5-candle lookback
AND ADX(14) > 20
AND +DI > -DI, if the DI filter is enabled
AND SMA(200) is rising, if the SMA trend filter is enabled
AND a new Long state has just appeared, if new signal only mode is enabled
AND the signal appears during the trading session
AND trade direction allows Long entries
Long exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Signal SMA turns downward
Reversal when a valid Short signal appears
Automatic position close at the end of the trading session
Short entry:
Signal SMA is falling based on the 5-candle lookback
AND ADX(14) > 20
AND -DI > +DI, if the DI filter is enabled
AND SMA(200) is falling, if the SMA trend filter is enabled
AND a new Short state has just appeared, if new signal only mode is enabled
AND the signal appears during the trading session
AND trade direction allows Short entries
Short exit:
Stop loss: 10 points from entry price
Take profit: 20 points from entry price, if enabled
Signal SMA turns upward
Reversal when a valid Long signal appears
Automatic position close at the end of the trading session
Strategy logic:
CNPS 05 is suitable for market phases with clear trend direction. The signal SMA identifies the main direction. ADX filters for markets with enough trend strength. DI confirms whether buying or selling pressure is dominant.
This structure helps reduce noise in sideways conditions. The bot does not rely only on SMA slope. It also requires enough trend strength and directional confirmation from DI.
Time filter:
The default trading session is 09:00 – 14:30, designed to avoid two abnormal volatility periods.
ATO 08:45 – 09:00 is the opening auction period. Price can gap strongly and technical signals may be noisy.
ATC and negotiated trading 14:30 – 15:00 is the closing auction period. Price can move sharply or reverse quickly.
Users can adjust the start time and end time in the bot settings.
Risk disclaimer:
Futures trading involves a high level of risk and prices can move sharply. This script is provided for reference, research, and backtesting purposes only. Users should fully understand derivatives trading, their own risk tolerance, and the strategy logic before applying it to live trading.
All investment decisions are the responsibility of the user. phaisinh.online is not responsible for any losses arising from the use of this strategy in real trading. Past performance does not guarantee future results.
______________________________________________________________
"SMA ADX DI Trend Following" là một chiến lược giao dịch theo xu hướng, được thiết kế nhằm xác định và nắm bắt các chuyển động giá theo xu hướng bằng cách kết hợp phân tích độ dốc SMA với xác nhận sức mạnh xu hướng từ ADX và tín hiệu định hướng từ DI. Chiến lược sử dụng SMA(89) để xác định hướng xu hướng chính, trong khi ADX(14) xác nhận thị trường đang có đủ sức mạnh xu hướng và DI xác định bên mua hay bên bán đang chiếm ưu thế.
Bằng cách yêu cầu sự đồng thuận giữa hướng xu hướng, sức mạnh xu hướng và động lượng định hướng, chiến lược hướng tới việc lọc các điều kiện thị trường yếu hoặc không rõ xu hướng, đồng thời tham gia vào các xu hướng intraday mạnh hơn. Bộ lọc xu hướng SMA(200) tùy chọn cung cấp thêm xác nhận về xu hướng tổng thể. Chiến lược cũng bao gồm các tùy chọn Stop Loss, Take Profit, bộ lọc khung thời gian giao dịch, cài đặt xác nhận tín hiệu và cơ chế tự động đóng vị thế khi kết thúc phiên, nhằm đảm bảo quản trị rủi ro một cách chặt chẽ và có kỷ luật.
Cài đặt & cấu hình chiến lược:
Biểu đồ: khuyến nghị khung 15 phút
Khối lượng giao dịch: 3 hợp đồng
Chu kỳ SMA tín hiệu: 89
SMA slope lookback: 5
Chu kỳ ADX: 14
Ngưỡng ADX: 20
Bộ lọc DI: Bật / Tắt
Chỉ vào khi tín hiệu mới: Bật / Tắt
Bộ lọc xu hướng SMA: Tắt mặc định
Chu kỳ SMA bộ lọc: 200
Cắt lỗ: 10 điểm
Chốt lời: 20 điểm
Dùng chốt lời: Bật / Tắt
Bộ lọc giờ: Bật / Tắt
Khung giờ giao dịch: 09:00 – 14:30
Chiều giao dịch: Mua / Bán / Cả hai
Hiện mũi tên tín hiệu: Tắt mặc định
Cài đặt mặc định của script:
Chiến lược sử dụng SMA tín hiệu chu kỳ 89 để xác định hướng chính của thị trường. Thay vì so sánh SMA hiện tại với đúng một nến trước, bot sử dụng SMA slope lookback 5.
Điều này có nghĩa là bot so sánh SMA hiện tại với SMA của 5 nến trước. Nếu SMA hiện tại cao hơn SMA của 5 nến trước, SMA được xem là đang dốc lên. Nếu SMA hiện tại thấp hơn SMA của 5 nến trước, SMA được xem là đang dốc xuống.
Cách tính này giúp giảm nhiễu trên khung 1 phút. Bot không vào lệnh chỉ vì SMA nhích nhẹ trong một nến ngắn.
ADX(14) được dùng để xác nhận sức mạnh xu hướng. Khi ADX lớn hơn 20, thị trường được xem là có đủ lực xu hướng để xét tín hiệu giao dịch.
DI được dùng để xác nhận hướng xu hướng. Khi +DI lớn hơn -DI, lực tăng đang chiếm ưu thế. Khi -DI lớn hơn +DI, lực giảm đang chiếm ưu thế.
Khi bật bộ lọc DI, bot chỉ cho phép lệnh Mua khi +DI > -DI. Bot chỉ cho phép lệnh Bán khi -DI > +DI.
Tùy chọn “Chỉ vào khi tín hiệu mới” giúp hạn chế vào lại liên tục trong cùng một trạng thái. Khi bật tùy chọn này, bot chỉ vào lệnh khi trạng thái Long hoặc Short vừa mới xuất hiện.
Bộ lọc SMA(200) được để tắt mặc định. Người dùng có thể bật bộ lọc này nếu muốn giao dịch chặt hơn theo xu hướng lớn.
Khi bật bộ lọc SMA(200), script chỉ cho phép lệnh Mua khi SMA(200) dốc lên và chỉ cho phép lệnh Bán khi SMA(200) dốc xuống.
Điều kiện vào và thoát lệnh:
Vào lệnh Mua:
SMA tín hiệu dốc lên theo lookback 5
VÀ ADX(14) > 20
VÀ +DI > -DI, nếu bật bộ lọc DI
VÀ SMA(200) dốc lên, nếu bật bộ lọc xu hướng SMA
VÀ trạng thái Mua vừa mới xuất hiện, nếu bật chế độ chỉ vào tín hiệu mới
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Mua
Thoát lệnh Mua:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
SMA tín hiệu đảo chiều xuống
Đảo chiều khi xuất hiện tín hiệu Bán hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Vào lệnh Bán:
SMA tín hiệu dốc xuống theo lookback 5
VÀ ADX(14) > 20
VÀ -DI > +DI, nếu bật bộ lọc DI
VÀ SMA(200) dốc xuống, nếu bật bộ lọc xu hướng SMA
VÀ trạng thái Bán vừa mới xuất hiện, nếu bật chế độ chỉ vào tín hiệu mới
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Bán
Thoát lệnh Bán:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
SMA tín hiệu đảo chiều lên
Đảo chiều khi xuất hiện tín hiệu Mua hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Logic chiến lược:
CNPS 05 phù hợp với các giai đoạn thị trường có xu hướng rõ ràng. SMA tín hiệu giúp xác định hướng di chuyển chính. ADX giúp lọc những giai đoạn thị trường có lực. DI giúp xác nhận lực đang nghiêng về bên Mua hay bên Bán.
Cấu trúc này giúp bot hạn chế tín hiệu nhiễu trong vùng sideway. Bot không chỉ nhìn độ dốc SMA, mà còn yêu cầu thị trường có đủ sức mạnh xu hướng và có xác nhận hướng từ DI.
Bộ lọc giờ:
Mặc định 09:00 – 14:30, nhằm tránh hai vùng biến động bất thường.
ATO 08:45 – 09:00 là giai đoạn khớp lệnh mở cửa. Giá thường có thể gap mạnh và tín hiệu kỹ thuật dễ bị nhiễu.
ATC và giao dịch thỏa thuận 14:30 – 15:00 là giai đoạn khớp lệnh đóng cửa. Giá có thể biến động mạnh hoặc đảo chiều nhanh.
Người dùng có thể điều chỉnh giờ bắt đầu và giờ kết thúc trong phần cài đặt bot.
Tuyên bố rủi ro:
Giao dịch hợp đồng tương lai có mức độ rủi ro cao và giá có thể biến động mạnh. Script này chỉ phục vụ mục đích tham khảo, nghiên cứu và kiểm thử. Người dùng cần hiểu rõ giao dịch phái sinh, khẩu vị rủi ro cá nhân và logic của chiến lược trước khi áp dụng vào giao dịch thực tế.
Mọi quyết định đầu tư thuộc trách nhiệm của người dùng. phaisinh.online không chịu trách nhiệm cho bất kỳ khoản lỗ nào phát sinh từ việc sử dụng chiến lược này trong giao dịch thực tế. Hiệu quả trong quá khứ không đảm bảo kết quả trong tương lai.
Estrategia

Decision timeDecision Time is an intraday session overlay built around fair-value boxes and confirmation after a breakout retest. The script creates a box from a selected session's anchor candle, extends that box for the configured session duration, and then tracks whether price breaks out, retests, and confirms continuation with a second close outside the box.
The indicator supports multiple session anchors:
- Market Reopen
- Asia
- London
- New York Open
- New York PM
- Pre-news
How it works:
- When a selected session begins, the script captures the anchor candle.
- The fair-value box is built from either the anchor candle range or a fixed band around the chosen fair-price source.
- If price closes above the box, the script starts watching for a bullish retest that still holds above the box.
- If the next candle also closes above the box, the script prints a long signal.
- The bearish sequence is mirrored below the box.
Session behavior:
- Each session can be enabled or disabled independently.
- Each session box can use its own duration.
- The Asia session can optionally extend for the full day.
- The script can also color each session start candle and draw a separate rectangle around that start candle.
- A preview box shows the next upcoming session.
Main inputs:
- Session timezone and display timezone
- Session enable/disable toggles
- Per-session box lengths
- Fair-price source: Open, Midpoint, or Close
- Fair-value box mode: anchor candle range or fixed band
- Entry window after the anchor
- Maximum bars allowed between breakout and retest
- Retest touch and close conditions
- Signal limits and cooldown
- Session start candle colors and optional start-candle rectangles
Visual outputs:
- Session fair-value boxes
- Fair-price line
- Breakout and retest markers
- Long and short confirmation labels
- Session phase background shading
- Next session preview box
- Session start candle coloring
What makes this script different:
- It is session-anchored rather than using one continuous breakout model for the whole chart.
- It separates the breakout, retest, and confirmation steps instead of flagging the first close outside the range as the final signal.
- It allows different session box lengths and a full-day Asia mode, which makes it easier to adapt the same workflow across multiple market phases.
Important limitations:
- This is an indicator, not a strategy or automated execution system.
- It does not place orders, manage risk, or calculate performance.
- Signals depend on the selected session anchors, duration settings, and chart timeframe.
- The logic is designed for intraday use and may be less useful on higher timeframes or symbols with very different session behavior.
- A signal only means the configured box/retest conditions were met. It does not guarantee continuation or profitability.
This script is for chart analysis and workflow structure only. It is not financial advice. Indicador

Multi EMA SMA Pro - 5/13/20/50/100/200 - MTFMULTI EMA/SMA PRO — 5/13/20/50/100/200 + MTF
Nine independent moving averages in one indicator, each with its own length,
type, timeframe, color and width. Defaults give you the classic 20 / 50 / 100 /
200 on your chart timeframe, with 5 and 13 a click away.
EVERY LINE IS LABELLED
No more guessing which line is which. Each average is tagged at the right edge
with its length — and optionally its type, its timeframe, its current value, and
how far price sits from it in percent. You read "200 D +18.06%" straight off the
chart instead of hovering over lines to find out.
DAILY / WEEKLY / MONTHLY AVERAGES ON ANY CHART
Every slot has a Chart / Daily / Weekly / Monthly / Custom selector, so you can
sit on a 5-minute chart and still see exactly where the daily 200 and the weekly
200 are — the levels that actually decide intraday reversals. Slots 7, 8 and 9
come pre-set to 200 D, 30 W and 200 W. Each higher-timeframe line is tagged with
D, W or M so there is never any ambiguity about what you are looking at. Ask for
a timeframe below your chart and the slot quietly falls back to chart data rather
than returning misleading values.
INFO TABLE
An on-chart panel lists every enabled average, its current value, and how far
price is above or below it in percent, color-coded green and red. It is the
fastest way to tell whether price is extended and due a snap back, or resting on
support. Decimal precision is adjustable.
GOLDEN CROSS / DEATH CROSS, DONE PROPERLY
GC/DC detection is on by default and measured on the DAILY 50 vs 200 no matter
what timeframe you are viewing — so an intraday chart shows the real cross, not a
5-minute imitation of one. Markers carry their own context: "GC 50/200 D".
Lengths, timeframe and MA type are all configurable, or you can point the cross
logic at any two of your plotted lines instead.
EVERYTHING ELSE
- EMA / SMA / WMA / HMA / RMA / VWMA globally, or overridden per line
- Custom source, plot offset, transparency, per-line width and color
- Line / step-line / circles / cross plot styles
- Slope-based coloring (green rising, red falling)
- Ribbon fill between any two averages
- Alerts for price crossing each average, plus golden and death cross
- Palette chosen to stay readable on both light and dark chart backgrounds
A NOTE ON HIGHER-TIMEFRAME DATA
Leave "wait for bar close" off and the daily and weekly lines update live inside
the forming candle, which is usually what you want when trading. The trade-off is
that an intraday cross can appear and then disappear before the session closes.
Turn it on for confirmed, non-repainting values that step one bar late.
If you find this useful, a boost is appreciated. Suggestions and feedback welcome in the comments.
Open-source — feel free to study, fork, and adapt. Indicador
