Reversal Radar PRO | Market Tops & Bottoms
↺ Reversal Radar PRO — Tops & Bottoms
Most “reversal” tools fire one arrow and disappear. This one runs three layers: a heads-up while the bar is still forming, a confirmed print after the swing is locked, and a live status on whether that reversal is still valid.
The point is not to catch every wick. It is to grade the turn, map the zone, and tell you when the chase is already late.
① Early-warning
Live-bar gauge. It can repaint — that is stated on purpose. Use it as danger / opportunity forming, not as an entry.
② Confirmed
Pivot-locked after the right-side bars. Does not repaint. Weighted 0–100 confidence with a grade, a vote floor, and a cooldown. Factors that can vote: RSI extreme, RSI divergence (quality-scored), volume climax, Bollinger pierce, over-extension from the mean, Stoch-RSI, wick rejection, engulfing, higher-TF RSI, liquidity sweep. Regime can boost or cut the score. Hidden divergence trims it — that is continuation, not a turn.'
③ Follow-through
Once a confirmed top or bottom is on, the radar tracks:
Active / late / soft invalid / hard invalid / target hit
Soft and hard invalidation distances
Chase quality (good → poor) vs progress to target
Mapped target and R:R
🗺 On the chart
Confirmed labels (confidence + grade) or simple arrows
Tiny diamonds for early-warning
Reversal zone boxes at the pivot
Clustered S/R that merge nearby swings, count touches, and flip when broken
📟 Dashboard
Regime and “best play” (fade the trend, or both sides). Trend efficiency. Volatility state. RSI / HTF RSI / Stoch-RSI. Bollinger position. Extension. Volume vs average. Divergence quality. Early-warn reading. Active signal, status, chase, target. Nearest S/R. Last print and how many bars ago.
🎯 How to use it
Wait for confirmed unless you accept that early-warning will flicker. In a strong uptrend, bottoms are the preferred fade — not every red wick. If chase already reads late, you missed the turn; do not market-order the remainder. Hard invalidation ends the idea. Soft invalidation is a warning, not a rewrite of history. Indicador

Level Watch & Touch Ledger [MQLSoftware]OVERVIEW
Level Watch & Touch Ledger keeps an audit trail of what price actually did at the levels you draw yourself. You type in up to eight prices and the script records every time price came to each one, what happened next, and how far past the line it ran before turning. It discovers nothing on its own: it never scans, clusters or ranks levels, and it produces no entries, stops, targets or position sizing. It answers one question about levels you already care about — has this one actually been respected on this chart, or does it only look important?
CONCEPTS
A plain touch counter is close to useless, because price grinding sideways on a level logs a touch every bar and the count becomes noise. The engine here is a re-arm gate: after an event resolves, a level goes quiet until price has closed a configurable ATR distance away and a cooldown has passed. Only then can it register another touch. That turns an ordinary consolidation into a small number of events instead of forty.
Each event resolves exactly once, on a closed bar, and is frozen. REJECTED means price closed back on the side it approached from by the outcome margin; BROKEN means it closed through by that margin; CHOP means neither happened inside the outcome window. A latched outcome is never rewritten, so the table cannot quietly improve as new bars arrive.
Overshoot is measured on rejections only. A break is declared once price closes beyond the level by the outcome margin, so a broken event's overshoot is floored by your own setting and would describe the input rather than the market. A bar that gaps clean over a level never touches the zone, so gaps are detected separately and recorded as breaks — otherwise a level's failures go uncounted and gap-prone symbols look more reliable than they are.
FEATURES
Eight independent level slots, each with its own ledger. A state readout per level, from OUT OF RANGE and WARMING UP through ARMED, PENDING and COOLDOWN. Touch count and bars since the last one. The rejected / broken / chop split. A rejection rate whose denominator includes chop. Median and 75th-percentile rejection overshoot in ATR. Shaded touch zones, level lines, and a marker on every recorded touch. Alerts on touch and outcome, plus a proximity ladder that fires only as price closes in, never as it walks away.
HOW TO USE
Type a price into Level 1 and read the row. Zone half-width sets how close counts as a touch; re-arm distance is the main lever on how many events you get; outcome window and margin decide how decisively price must move. Rates and overshoot both stay behind one minimum-sample input and read "collecting" until the level has enough resolved events — four touches give you an audit trail, not a statistic. A median overshoot of zero is a real answer, not a missing one: half the rejections turned before price reached your line.
Counts, rates, outcomes and markers are closed-bar figures and are never revised. The DIST column, the shaded zone width and the proximity alerts are live and update inside the forming bar; they are visual context, not signals.
CONCLUSION
This is a measurement tool for levels you supply, not a level finder and not a signal generator. Samples on a hand-drawn level are small by nature, and nothing here is a probability, an expectancy or a forecast — the figures describe what this chart's loaded bars did at your lines, shown with the sample size that produced them. Indicador

Smooths Heat Seeker Liquidity MapOverview
This indicator maps resting liquidity by detecting confirmed swing highs and lows at three independent lookback lengths, then rendering each one as a zone that visibly fades the longer it goes untouched. Instead of a static box that holds one shade until it's swept, each zone is built from small time-segments, and each segment locks in whatever color the zone's fade formula produces at the moment it's drawn — so a single zone shows a genuine gradient across its own lifetime, brightest where it formed and dimmer toward the present if nothing has happened to it since.
Concepts used
Tiered pivot detection: ta.pivothigh()/ta.pivotlow() run at three separate lookback lengths (Fast/Mid/Slow). A pivot only confirms after "Confirmation Bars" bars have passed with no higher high / lower low, which is what prevents repainting the level's location after the fact.
Age-based color decay: each level stores the bar index it was formed on. Every time a new segment is drawn, the indicator computes how many bars old the level is, runs that through a decay curve (fadeStrength input controls the curve's steepness), and converts the result into a transparency value for that segment only. Because past segments are never redrawn, the visual history of the fade is preserved rather than the whole zone jumping to one shade at once.
Mitigation vs. retest: a level is deleted the instant price crosses it (wick or close, user's choice) — that's treated as the liquidity being consumed. If price merely touches the level without crossing it, and "Refresh Fade On Retest" is on, the level's age resets to zero, so a level that keeps getting defended stays bright while one that's simply being ignored keeps fading toward removal.
Tier-priority merging: if a new pivot lands at the same price as an existing level, the indicator keeps the higher tier rather than creating a duplicate zone, so a level significant on the Slow lookback doesn't get visually diluted by a Fast-tier duplicate sitting on top of it.
How to use it
Add it to any chart/timeframe with default settings. Brighter zones are recent or actively-retested liquidity; dimmer zones are levels the market has drifted away from without touching. Use Fast/Mid/Slow tier colors to separate minor intraday levels from more structurally significant ones, and adjust Fade/Lifetime, Fade Strength, and Cell Width to control how far back the map looks and how coarse or smooth the fade appears.
Originality
This is not a combination of other publications — there's a single detection-and-rendering pipeline here (pivot detection → age tracking → per-segment decay → mitigation/retest handling), and every part of it was written for this script. No code, calculations, or visual techniques are reused from another publication.
Inputs
Fast / Mid / Slow — pivot lookback lengths for the three liquidity tiers
Confirmation Bars — bars required after a swing point before it's confirmed
Mitigate On — wick or close removes a level
Fade/Lifetime, Fade Strength, Cell Width — control how long a zone lives and how its decay curve is shaped
Refresh Fade On Retest — restarts a zone's age on an unmitigated touch
Box Height Multiplier — sets zone thickness as a multiple of ATR
Weak / Mid / Strong colors — one color per tier
This indicator has no signals, alerts, or trade markers — it's a pure visualization of where liquidity currently sits on the chart, and how fresh or stale each level is. Indicador

Pattern Atlas : Geometric [AxeAlgo]Pattern Atlas : Geometric Patterns
WHAT THIS LIBRARY IS
This is a Pine Script v6 library of 17 classical chart pattern detectors — Head and Shoulders, Double/Triple Tops and Bottoms, triangles, wedges, flags, and the rest of the standard technical-analysis catalog built from swing highs and lows rather than single-candle shape. Unlike candlestick patterns, which read one to a handful of fixed bars, chart patterns span a variable, often large number of bars, so this library carries one small piece of state — a rolling history of confirmed swing pivots — that every pattern function reads from. Beyond that, the same philosophy as Library #1 applies: no plotting, no alerts, and no inputs in this script by design, since a library's job is to hand other scripts a clean, reusable, well-documented API, not to draw on a chart itself (Pine doesn't allow a library to plot anything anyway). If you're looking for a ready-to-use indicator built on top of this library, see the companion "Pattern Atlas : Geometric Indicator " script, which imports every function here and turns it into on-chart signals, measured-move price targets, a live scanner table, and alerts.
Chart pattern analysis is one of the foundational tools of classical technical analysis, going back to Edwards and Magee's original work and refined since by researchers like Thomas Bulkowski, whose statistical studies of pattern behavior are the closest thing this field has to an industry-standard reference. The patterns in this library follow that standard catalog, so anyone who already knows what a Head and Shoulders top or an Ascending Triangle looks like will recognize exactly what each function is checking for.
WHY A LIBRARY INSTEAD OF ONE MONOLITHIC INDICATOR
Splitting detection logic out as an importable library means:
- Any Pine coder building their own strategy, indicator, or screener can pull in exactly the pattern checks they need without copy-pasting swing-pivot and trendline math into every new script.
- The detection logic is tested and maintained in one place. When a threshold gets refined, everything importing this library benefits from the update by bumping one version number.
- It keeps the math separate from presentation — how a pattern gets drawn, colored, or alerted on is a completely separate decision from whether the pattern is actually present, and different users want different presentations.
HOW TO IMPORT AND USE IT
Add this line near the top of your script (adjust the version number to whatever the current published version is):
import AxeAlgo/Pattern_Atlas_Geometric/1 as geo
Unlike Library #1, most of the functions here need a shared pivot history to work from. Call trackPivots() exactly once per bar, then pass its result into every detect*() function that needs it:
pivots = geo.trackPivots()
match = geo.detectDoubleTopBottom(pivots)
if match.found
label.new(bar_index, high, match.patternName)
Four functions — detectSpike(), detectFlag(), detectPennant(), and detectIslandReversal() — read directly off recent price action instead of the shared pivot history, so they're called without a pivots argument: geo.detectSpike().
trackPivots() takes three optional parameters: leftBars and rightBars (how many less-extreme bars must surround a candidate swing point before it confirms as a pivot — higher values mean fewer, more significant pivots, at the cost of a longer confirmation lag), and maxPivots (how much pivot history to retain). All three have sensible defaults.
Every detect*() function returns the same structure, called ChartPatternMatch, so the calling pattern is identical no matter which of the 17 you use. It has nine fields:
- found — true if the pattern matched at the evaluated bar, false otherwise.
- patternName — the specific name of what matched (e.g. "Ascending Triangle"), na when not found.
- direction — "bullish" or "bearish".
- pivotBars — bar_index of each pivot the match was built from, in chronological order.
- pivotPrices — price of each pivot, in the same order as pivotBars.
- breakoutLevel — the support, resistance, or neckline level price broke through to confirm the pattern.
- necklineSlope — slope (price per bar) of the breakout line, na when the pattern's breakout level isn't a sloped line.
- barIndex — the bar_index the pattern completes (breaks out) on.
- description — a full sentence naming the pattern and the actual measured price levels that triggered it — genuinely useful for a tooltip or an alert message, not just a repeat of the pattern name.
Two additional exported functions turn that raw match into something more actionable, and both work on any ChartPatternMatch regardless of which detect*() function produced it:
- patternStrength(match) — a 0-100 score for how decisively the confirmation close broke through breakoutLevel, relative to the pattern's own price range. A breakout that clears the level by a meaningful fraction of the pattern's own size scores higher than a one-tick poke through it.
- patternTarget(match) — a classical measured-move price target, projecting the pattern's own height from the breakout point. Returns na for patterns without a reliable height to project from (V-Top/V-Bottom Spike, Island Reversal, Bump-and-Run Reversal).
Every detect*() function also exposes its own set of tunable threshold parameters — how flat a "flat top" has to be, how much two shoulders can differ and still count as equal, and so on — all with sensible defaults so you don't have to touch them unless you want to tighten or loosen a specific pattern's sensitivity for a particular instrument or timeframe.
THE 17 PATTERNS
Reversal patterns (7) — signal a potential change in the prevailing trend:
- Head and Shoulders / Inverse Head and Shoulders — detectHeadAndShoulders(). Three swing extremes with the middle one more extreme than the two roughly-equal outer ones, confirmed when price breaks the neckline connecting the two points between them.
- Double Top / Double Bottom — detectDoubleTopBottom(). Two roughly equal peaks (or troughs) with a retracement between them, confirmed when price breaks back through that retracement level.
- Triple Top / Triple Bottom — detectTripleTopBottom(). The same idea as a Double Top/Bottom with a third roughly-equal touch, confirmed on the break of the support or resistance formed between the touches.
- Rounding Top / Rounding Bottom — detectRoundingTopBottom(). A gradual, curved advance-and-rollover (or decline-and-recovery) between two similar edge levels. Approximate: read from three swing pivots rather than fitting a true curve.
- Diamond Top / Diamond Bottom — detectDiamondTopBottom(). Swing range that widens and then narrows again, confirmed on a break of the resulting support or resistance. Rare and approximate: read from three pivot pairs rather than a clean diamond outline.
- Broadening Formation — detectBroadeningTopBottom(). Diverging highs and lows forming an increasingly volatile range, confirmed on a break of either edge. Approximate: read from two pivot pairs rather than a hand-fitted diverging channel.
- V-Top / V-Bottom (Spike) — detectSpike(). A single sharp extreme with no rounding — a large move into the pivot and an equally large move away from it, both measured against the recent average bar range, within a handful of bars. Self-contained, no pivots argument needed.
Continuation patterns (8) — typically resolve in the direction of the move that preceded them:
- Ascending Triangle — detectTriangleAscending(). Flat resistance with rising support, confirmed on a break above resistance.
- Descending Triangle — detectTriangleDescending(). Flat support with falling resistance, confirmed on a break below support.
- Symmetrical Triangle — detectTriangleSymmetrical(). Converging highs and rising lows, confirmed (bullish or bearish) whichever side the price actually breaks.
- Rising Wedge / Falling Wedge — detectWedge(). Both trendlines slope the same direction and converge; breaks the opposite way from the slope, since the shared-direction move was already losing momentum.
- Bull Flag / Bear Flag — detectFlag(). A strong directional move (the pole), followed by a tight, roughly parallel pullback, confirmed on a break back out in the pole's direction. Self-contained, no pivots argument needed.
- Bull Pennant / Bear Pennant — detectPennant(). The same pole-and-consolidation structure as a Flag, but the consolidation narrows and converges rather than staying parallel. Self-contained, no pivots argument needed.
- Rectangle — detectRectangle(). Price boxed between flat support and flat resistance, confirmed on a break of either edge.
- Cup and Handle / Inverted Cup and Handle — detectCupAndHandle(). A rounded recovery (or decline) back to its starting rim, then a shallow pullback (the handle), confirmed on a break through the rim.
Structural / gap-based patterns (2):
- Bullish / Bearish Island Reversal — detectIslandReversal(). A bar (or small cluster) isolated by a gap on both sides, then abandoned by a gap the other way — an abrupt reversal. Self-contained, pure gap logic, no pivots argument needed.
- Bump-and-Run Reversal — detectBumpAndRun(). A lead-in trendline, then a "bump" phase accelerating well beyond it, then a "run" breaking back through the lead-in line. Approximate: the lead-in line is read from just two pivots rather than a hand-drawn trendline.
WHAT THIS LIBRARY DELIBERATELY DOES NOT DO
No plotting, no drawing, no alertcondition() calls, and no inputs — Pine doesn't allow any of those inside a library in the first place, since a library can never be added to a chart on its own. If you want signals, price targets, a scanner table, or alerts, import this library into your own script (or use the companion "Pattern Atlas : Chart Pattern Scanner " indicator, which does exactly that) rather than expecting this script to render anything by itself.
This library also does not evaluate multi-timeframe data, volume, or broader market structure — it's swing-pivot and trendline geometry only, on purpose, so its behavior is easy to reason about and easy to reuse as one building block among several.
Four of the seventeen patterns are explicitly noted above as approximate: Rounding Top/Bottom, Diamond Top/Bottom, Broadening Formation, and Bump-and-Run Reversal are read from a small, fixed number of swing pivots rather than fitting a true curve or hand-drawn trendline to the data. They will not catch every textbook-perfect example of these shapes, and they may occasionally flag a looser approximation of one. Treat them as a starting point for further chart review, not a final word.
PART OF A LARGER SERIES
This is Library #2 in the AxeAlgo Pattern Atlas — a planned set of Pine libraries splitting pattern detection by the method actually used to find each kind of pattern: candlestick shape (Library #1, already published), classical chart/geometric patterns (this library), harmonic patterns (Fibonacci-ratio XABCD structures), and market-structure concepts (order blocks, liquidity, Wyckoff-style events). Each library is independent and useful on its own; together they're meant to cover technical pattern analysis without forcing unrelated detection methods into the same function.
A NOTE ON REPAINTING
trackPivots() only confirms a swing pivot once rightBars bars have passed since it happened — the same confirmation lag ta.pivothigh()/ta.pivotlow() use, just written out as plain comparisons so it works safely inside a library's exported functions. That means a pivot never moves or disappears once confirmed; it just takes rightBars bars to become known, which is a normal and unavoidable part of swing-pivot detection, not a defect in this library. On the currently-forming bar, a pattern's found status can still change tick to tick as that bar's own high, low, and close move — that's inherent to reading live price action. If you're building persisted signals, drawings, alerts, or price targets on top of these functions (rather than a live "what's happening right now" readout), gate your usage on barstate.isconfirmed so a signal only fires once the bar it describes has actually closed, exactly like the companion scanner indicator does.
DISCLAIMER
This library is a technical analysis tool for identifying classical chart pattern shapes in historical and live price data. It does not predict future price movement, and a detected pattern — including any projected price target — is a description of past price action, not a signal guaranteed to repeat. Nothing in this script constitutes financial advice. Always combine pattern recognition with your own risk management and broader analysis before making any trading decision.
Biblioteca

Acceptance-Retest indicator# Acceptance-Retest Dashboard
**Companion to the Sweep-Reclaim Dashboard.** Same four levels, same session logic, opposite
read on price behavior — this one tracks what happens when a level *doesn't* reject.
---
## What this script does
Most level-based tools only handle one outcome: price hits a level and reverses. But price at
a key level only ever does one of three things — **rejects, accepts, or chops** — and a
rejection-only tool is blind to two-thirds of that.
This script tracks the **acceptance** case: a level breaks, price *holds* beyond it instead of
snapping back, and a genuine continuation trade sets up on the retest or base that follows.
It automatically:
- Plots **PDH / PDL / ONH / ONL** — prior-day high/low and overnight high/low
- Detects a real breakout close (not just a wick) beyond any of the four levels
- Confirms the level actually held before treating it as a trade candidate
- Waits for a retest or a tight base to form, then triggers on the break of that structure
- Computes entry, stop, target and R:R automatically — no manual level math
- Tracks the trade live once triggered — active, target hit, stopped, or timed out — so you
always know whether the last signal is still good
- Fires a TradingView alert the moment a valid setup completes
Every signal on the chart is prefixed **`AR:`** so it's never confused with a rejection-style
signal from a different tool running on the same chart.
---
## The rule book — Acceptance-Retest methodology
### The core idea
At any key level, price does one of three things:
| Behavior | Candle signature | What it means |
|---|---|---|
| **Rejection** | Wick through, closes back inside | Liquidity grab — level held |
| **Acceptance** | Real body close beyond, price holds | Level flipped — trade the hold |
| **Chop** | Repeated wicks and closes both sides | No edge — stand aside |
This script exists for the middle row. If you're already running a rejection/sweep-style
system, this is built to sit alongside it, not replace it — they read the *same* event and
reach opposite, mutually exclusive conclusions from it.
### The sequence, step by step
**1. Breakout.** Price trades through one of the four levels.
**2. Close confirmation.** A candle **closes** beyond the level — a real body close, not a
wick poking through. No close beyond → not this setup.
**3. No-reclaim check.** The next couple of candles must **not** close back on the original
side. If price reclaims within that window, this was a rejection, not an acceptance — a
different setup entirely, and this script drops it.
**4. Hold — retest or base.** Once the no-reclaim check passes, price needs to show one of two
structures before an entry is considered:
- **Retest:** a pullback toward the level that holds and turns, forming a higher low
(bullish) or lower high (bearish).
- **Base:** a tight, low-overlap sideways range instead of a pullback — still evidence the
level is holding, just without giving a clean retest.
If neither forms within a reasonable window, the attempt expires. Extended, un-based moves are
not entries — they're skips.
**5. Entry.** The break of the retest high/low, or the break of the base range.
**6. Stop.** Beyond the retest or base structure point — never an arbitrary distance, and
capped relative to that level's typical range so a single trade can't take on outsized risk
just because the structural point happened to be far away.
**7. Target.** A measured-move projection from the breakout level, pulled in to the nearer
opposing level when one exists inside that projection.
**8. Filter.** Minimum reward-to-risk gate — trades that don't clear it are skipped, not taken
anyway at reduced size.
### What invalidates a setup after it's already tracking
- **A reclose back through the level** during the hold phase — the move never actually held.
- **No retest or base within the watch window** — extended without structure.
- **Stop distance beyond the risk cap** — the structural stop doesn't fit, so the trade is
skipped rather than resized to fit.
- **Outside the trading window** — signals outside the configured session are not taken.
### Managing an active signal
Every valid trigger is tracked automatically against three outcomes, all defined *before*
entry, never adjusted mid-trade:
1. **Target hit** — the projected level is reached.
2. **Stop hit** — price trades back through the structural stop.
3. **Time stop** — not resolved by a configured cutoff time, closed out regardless of where
price is at that moment. A trade that hasn't reached target isn't a trade still "working" —
it's a trade that should be closed and logged honestly.
A trade that runs *past* target after a time stop already closed it doesn't get to become a
retroactive winner. The discipline is the point — not squeezing the best possible outcome out
of hindsight.
---
## Dashboard guide
**Level rows (PDH / PDL / ONH / ONL):**
- **Price** — the level's current value
- **Stage** — idle, no-reclaim check, or watching for retest/base
- **Bars** — how long the current stage has been running
- **Last signal** — the most recent outcome for that level: a full trade, or a specific skip
reason (reclaimed, expired, stop beyond cap, R:R too low)
**Active trade row:**
- The single most recent valid signal, with entry / stop / target
- **Status** — ACTIVE, TARGET HIT, STOPPED, or EXPIRED, updated live every bar
A level clustered too close to another active level is marked accordingly and excluded from
detection until it separates — this prevents two overlapping levels from generating
contradictory signals at effectively the same price.
---
## Settings
- **Sessions** — must match your other level-based indicators exactly, or the four levels will
disagree across scripts on the same chart.
- **Planning** — ATR length, minimum R:R, and the stop-risk cap (scaled to both the level's
typical range and current volatility, so a calm prior session doesn't choke off signals on a
day that's actually moving hard).
- **Acceptance rules** — how many bars must pass without a reclaim, how long to wait for a
retest/base before giving up, and how tight a base range needs to be to count.
- **Trading windows** — the session(s) during which new signals are allowed to trigger.
- **Time stop** — the cutoff time for closing anything still open.
- **Display** — dashboard position, text size, and whether to draw the level lines and active
trade markers on the chart.
---
## Notes
- This script draws its own copy of PDH/PDL/ONH/ONL so it works standalone; running it
alongside a companion rejection-style script on the same chart is fully supported — the
level math is identical, so both agree on where the four levels sit.
- Designed for 5-minute charts on index futures and related instruments; behavior on other
timeframes or asset classes has not been validated.
- A single active-trade slot is tracked at a time. A new valid signal replaces the previous
one rather than stacking multiple simultaneous trades.
---
## Disclaimer
This script is a **decision-support and rule-automation tool**, not a signal service or
trading advice. It mechanizes a specific discretionary methodology — it does not predict
price, guarantee outcomes, or account for news, liquidity conditions, or market regime shifts.
Past behavior of any setup shown here is not indicative of future results. All trading
decisions, position sizing, and risk management remain the sole responsibility of the user.
Backtest and forward-test thoroughly before applying any setup with real capital.
Indicador

Volume-Weighted Order Block Zones [BigBeluga]🔵 OVERVIEW
The Volume-Weighted Order Block Zones is an advanced technical indicator created by BigBeluga to identify and map institutional order blocks using pivot points and price displacement. Traditional order block indicators often highlight every single pivot zone, resulting in chart clutter and low-probability setups. In order to provide a solution to this problem, this indicator integrates volume-weighted strength calculations and ATR-based displacement triggers, ensuring that only high-momentum structural zones backed by significant volume are plotted.
The indicator aims to visualize institutional order-building and subsequent market expansions. The core element of its calculation involves tracking volume-weighted metrics against moving averages alongside a dynamic displacement formula defined as:
bearLevel = bearObHigh - atr * displacement
bullLevel = bullObLow + atr * displacement
where atr is the standard Average True Range of period 100, and displacement is the sensitivity multiplier. Higher values of displacement and minVolStrength allow the indicator to filter out weak market noise and focus exclusively on major institutional footprints.
🔵 FEATURES
The system utilizes a multi-layered matrix structure to provide actionable market intelligence:
1 — Swing & Volume-Weighted Detection Engine
Pivot Identification: Automatically tracks structural pivot highs and lows using a customizable swing length via pHigh = ta.pivothigh(high, swLen, swLen) and pLow = ta.pivotlow(low, swLen, swLen) .
Volume Strength Filtering: Calculates volume intensity percentages via f_getVolumeColor(vol, sma, baseColor) to filter out blocks falling below the minVolStrength threshold.
2 — Displacement Triggers & Order Block Mapping
Dynamic Trigger Lines: Projects live dashed trigger lines using line.new(bullObBar, bullLevel, bar_index, bullLevel, style=line.style_dashed) that extend dynamically until price achieves the required ATR displacement threshold.
Zone Visualization & Peak Labels: Plots high-precision order block boxes with volume percentage text alongside structural pivot high ( PH ) and pivot low ( PL ) labels.
3 — Active Zone Management & Retest Signals
Mitigation & Invalidation: Continuously monitors active zones inside the loop structure, automatically deleting order blocks when price breaches opposite boundaries or gets fully mitigated.
Retest Signals ( B / S ): Generates clear B (Bullish OB bounce) and S (Bearish OB rejection) signal labels when price retests active institutional zones.
🔵 HOW TO USE
Apart from the basic visualization of institutional market zones, this tool can also act in alternative ways to support decision-making:
Identify High-Volume Order Blocks: Look for newly formed order block boxes displaying strong volume percentages (e.g., above 20%+) to locate institutional liquidity entry points.
Manage Risk with Retest Labels: Monitor B and S retest signal labels to guide entries and manage stop losses as price interacts with active institutional zones.
🔵 NOTES
Why this implementation is unique:
It combines volume profile weighting directly with order block detection, filtering out low-volume traps automatically.
The dynamic live trigger line engine adapts seamlessly to real-time price action without cluttering historical chart data.
The script is fully optimized for Pine Script version 6, integrating robust array management var OB obBoxes = array.new() and dynamic box rendering for maximum performance.
Indicador

Reaction Weighted Support Resistance [Pineify]Reaction Weighted Support Resistance
Overview
Builds ATR-scaled support and resistance zones from confirmed swing pivots. Opacity encodes decayed completed reactions and bounded relative-volume context. It organizes chart evidence without forecasting price or performance.
Problem Definition
A common baseline draws one line per pivot and adds strength for every return. It scores shallow drift and decisive rejection equally, while old tests can dominate after conditions change. The map becomes crowded, and counts do not explain what happened after contact. The required invariant is a bounded set of areas weighted by subsequent displacement, participation context, and recency without assuming repetition.
Design Rationale
Confirmed pivots replace immediate extrema; zones begin at confirmation, not at the earlier swing bar. ATR width replaces fixed ticks, but geometry is frozen from known volatility. Nearby same-side zones merge only under a height cap. Touch count was rejected: entry opens a finite window, favorable movement is normalized by touch-time ATR, and bounded volume adjusts credibility without claiming directional flow. Decay fades stale reactions. The tradeoff is lag in exchange for auditable path memory.
Key Features
Confirmed pivot zones with ATR geometry.
Completed reaction scoring, volume context, and half-life decay.
Width-limited merging and bounded zone capacity.
Close invalidation, strength opacity, optional visuals, dashboard, and alerts.
How It Works
The engine reads chart OHLC, ATR, and average volume. Confirmed pivot lows create support and highs create resistance. Width is a fraction of pivot-time ATR; signals are not shifted backward.
A same-side candidate merges only below the height limit. Its center is score-weighted, so weak evidence cannot freely drag an established zone. Otherwise it is added; capacity removes the weakest.
A completed entry after cooldown stores ATR and bounded volume credibility, then tracks the best favorable extreme. Support measures upward displacement; resistance measures downward displacement. The result is floored at zero, ATR-normalized, capped, and volume-weighted. Missing volume uses a neutral fallback.
Each completed bar applies half-life decay; a saturating transform maps score to opacity. A close beyond the zone and ATR buffer invalidates it. Warm-up needs ATR, optional volume average, and pivot confirmation. Unclosed bars do not mutate state or fire alerts.
How Multiple Indicators Work Together
The components form one chain: pivots supply location, ATR supplies scale, the path window separates reaction from touch, volume changes confidence, decay tests recency, and invalidation bounds life. Without the window this becomes touch counting; without decay old history dominates; without ATR markets lose comparable units. The boxes expose the combined state rather than stacking unrelated signals.
Trading Ideas and Insights
Compare areas instead of assuming they will hold. Opaque support means prior completed visits produced larger, more recent upward reactions under this model; resistance is symmetric. Observe approach, overlap, departure, and confirmed failure. Entry alerts focus review above the strength threshold, while invalidation ends stored context. They do not define direction, size, execution, return, or reversal probability.
Unique Aspects
Each touch creates a bounded episode whose later displacement, touch-time volatility, volume credibility, and age update one state. Merging is score-weighted and width-limited. Teal and rose encode role, opacity encodes strength, amber marks failure, and the dashboard exposes scores and evaluated touches. This is an independent implementation; retrieved descriptions defined only the baseline, and no source code was reused.
How to Use
Choose pivot lengths for the intended swing horizon.
Set width and merge limits so boxes remain useful areas.
Read opacity with score and evaluated touches; faint zones have little evidence.
Use alerts as review prompts with separate execution and risk rules.
Review several market regimes before using the context.
Customization
Short pivot windows create more candidates; long windows are selective and slower. Width and merge controls set geometry. The evaluation window favors immediate or slower reactions. Half-life controls memory, not signal speed. The invalidation buffer sets tolerated close penetration. Volume length changes its baseline; alert strength changes qualification. Secondary markers, bar colors, and dashboard can be disabled.
Assumptions and Limitations
Pivots are delayed. ATR gaps can distort geometry. Forex or synthetic feeds may supply tick volume or no usable series, so fallback removes participation discrimination. Favorable extremes summarize path outcome, not order flow, causality, liquidity, or execution. Results depend on settings; capacity can evict weak areas. Close invalidation can lag gaps, while intrabar penetration is insufficient. The model does not predict bounces, trade, model costs, or establish profitability. Non-standard and illiquid charts need separate review.
Conclusion
Prominence depends on completed, volatility-normalized reactions, bounded volume context, and recency. Evidence fades, geometry stays controlled, and confirmed invalidation ends the zone. Historical reaction remains inspectable context, not certainty.
Indicador

Adaptive Structure Support & ResistanceChinese description is provided below. Chinese readers, please scroll down to read.
A structure-based support and resistance framework using confirmed pivots, price clustering, adaptive search ranges, historical reaction analysis and post-break role reversal.
1. What is this indicator?
Adaptive Structure Support & Resistance is a market-structure tool designed to identify the support and resistance areas that are currently most relevant to price.
The purpose of this script is not to display every historical swing high and swing low.
Instead, it attempts to answer a more practical question:
Among all historical turning points, which price areas still have enough structural significance to matter to the current market?
The script therefore treats support and resistance as a multi-stage structural problem.
The complete process is:
Identify confirmed swing highs and swing lows.
Merge nearby turning points into structural price clusters.
Evaluate the historical importance of each cluster.
Determine how far above and below the current price the model needs to search.
Select the most relevant support and resistance structures.
Evaluate the historical strength of the selected structures.
Convert exact levels into practical support/resistance zones.
Track what happens after a confirmed break.
Require a retest or rebound before confirming a support/resistance role reversal.
This means that the script is not simply:
ta.pivothigh(...)
ta.pivotlow(...)
followed by two horizontal lines.
Confirmed pivots are only the raw structural observations. Several additional stages are used before a level becomes the displayed support or resistance.
2. Why was this model designed?
Traditional automatic support/resistance tools often face several practical problems.
Too many levels
If every historical pivot is plotted independently, the chart can quickly become filled with horizontal lines. Many of those lines represent nearly identical prices or structures that are no longer relevant.
A single pivot may not represent a meaningful structure
A temporary local high or low can occur for many reasons. A more meaningful market structure often forms when price reacts around the same area multiple times.
Fixed search distances do not work equally well for every instrument
A low-volatility instrument may have meaningful support only 10–20% below the current price.
A highly volatile or strongly trending instrument may require a much wider historical price range before a significant support or resistance structure appears.
The nearest level is not always the most important level
A minor pivot located very close to current price may be less meaningful than a slightly more distant area that has produced several strong historical reactions.
A breakout does not automatically mean role reversal
Resistance does not necessarily become support simply because price trades above it once.
Likewise, support does not necessarily become resistance immediately after one breakdown.
The model is designed around these problems.
Its goal is therefore not to maximize the number of detected structures, but to reduce historical information into a smaller set of currently relevant structural areas.
3. Where can this indicator be used?
The script is intended for standard price charts where historical swing structure is meaningful.
Typical applications include:
Stocks
Indices
ETFs
Futures
Foreign exchange
Cryptocurrency
Other liquid instruments with usable price history
It can be used on different timeframes, but the meaning of the detected structure changes with the timeframe.
For example:
A support structure on a 15-minute chart describes short-term intraday structure.
A support structure on a daily chart describes a larger swing structure.
A support structure on a weekly chart may represent a long-term structural price area.
The indicator does not automatically convert a lower-timeframe level into a higher-timeframe level.
The displayed support and resistance always belong to the chart timeframe being analyzed.
4. Core principle: confirmed structural pivots
The first stage identifies confirmed pivot highs and pivot lows.
A pivot requires price bars on both sides of the potential turning point.
Representative logic:
float pivotHigh = ta.pivothigh(
high,
pivotLeftBarsInput,
pivotRightBarsInput)
float pivotLow = ta.pivotlow(
low,
pivotLeftBarsInput,
pivotRightBarsInput)
The important word here is confirmed .
A newly formed high is not immediately considered a structural resistance observation.
A newly formed low is not immediately considered a structural support observation.
The model waits for the configured number of right-side bars before confirming the pivot.
The intention is to sacrifice some immediacy in exchange for more stable structural observations.
This also means that pivot detection naturally contains confirmation delay.
That delay is part of the methodology rather than an attempt to predict a turning point before it exists.
5. Core principle: price clustering
Multiple pivots occurring around similar prices should not necessarily be treated as unrelated horizontal levels.
For this reason, the script groups nearby pivot observations into price clusters.
Conceptually:
float distancePercent =
math.abs(price - clusterPrice) /
clusterPrice *
100.0
if distancePercent <= mergePercent
matchingIndex := clusterIndex
If several historical lows occur around approximately the same area, they can contribute to one support structure.
The same process applies to historical highs when building resistance structures.
This changes the interpretation from:
"Price touched 12.01, 12.05 and 12.09."
to:
"Price has repeatedly reacted around the same structural area."
The cluster center is updated using the accumulated structural contribution of its observations rather than simply keeping the first pivot price.
6. Core principle: structural ranking
Not every cluster deserves the same importance.
Each pivot contributes a base structural score that incorporates relative volume participation and recency.
A simplified representation of the calculation is:
float pivotBaseScore =
1.0 +
volumeWeightInput * volumeRatio +
recencyWeightInput * recencyFactor
When several pivots belong to the same cluster, their contributions accumulate.
After the candidate clusters have been created, the model evaluates structures within the active search range.
The final ranking also gives a limited preference to structures nearer the current price:
float candidateRank =
accumulatedBaseScore +
proximityBonusInput *
proximityFactor
Proximity is therefore useful, but it is not the entire model.
A level is not selected only because it is the nearest pivot.
7. Relative volume participation
Historical price reactions can contain different levels of market participation.
For each pivot observation, volume is compared with its recent average.
Representative logic:
float volumeRatio =
pivotAverageVolume > 0.0
? math.min(
pivotVolume / pivotAverageVolume,
3.0)
: 1.0
Higher relative volume can contribute additional structural weight.
However, volume is only one component.
The model does not assume that high volume by itself automatically creates support or resistance.
8. Historical reaction analysis
A structural level is more informative when historical interactions with that area produced meaningful price responses.
For a support pivot, the model measures the maximum upside response after the confirmed low during a configurable observation window.
Conceptually:
float reactionPercent =
(highestPostPivotPrice / pivotPrice - 1.0) *
100.0
For resistance, the opposite calculation is used:
float reactionPercent =
(pivotPrice - lowestPostPivotPrice) /
pivotPrice *
100.0
This allows the model to distinguish between two different situations.
A level that price touched repeatedly but barely reacted to.
A level where historical interaction repeatedly produced meaningful rejection or recovery.
These situations are not treated as structurally equivalent.
9. Why the search range is adaptive
One of the main design features of this script is that support and resistance do not have to use the same fixed search distance.
A fixed 25% range can work well for one instrument but fail on another.
A fixed 100% range may capture important historical structures, but can also introduce unnecessarily distant structures when meaningful nearby levels already exist.
The Auto mode therefore uses progressive search tiers.
25%
50%
75%
100%
The algorithm first asks whether the nearest tier contains a structure that satisfies minimum structural requirements.
If it does, the search can stop.
If it does not, the model expands to the next tier.
Representative logic:
if distancePercent <= 25.0
result := 25.0
else if distancePercent <= 50.0 and maximumRangePercent >= 50.0
result := 50.0
else if distancePercent <= 75.0 and maximumRangePercent >= 75.0
result := 75.0
else if distancePercent <= 100.0 and maximumRangePercent >= 100.0
result := 100.0
The important feature is that support and resistance are evaluated independently .
For example:
Support search range: 25%
Resistance search range: 75%
This can occur when a meaningful support structure exists close below price, while the next meaningful resistance structure is much farther above the market.
10. The model does not stop at the first nearby pivot
Adaptive search would not be useful if any small nearby pivot could immediately stop expansion.
The model therefore requires a nearby structure to satisfy minimum quality conditions.
Conceptually:
bool qualifiedStructure =
touchCount >= minimumStructureTouchesInput and
structureQuality >= adaptiveQualityThreshold
Only a qualified structure can stop the search from expanding to the next distance tier.
This prevents a minor local pivot from automatically hiding a larger and more meaningful historical structure.
11. Volatility-aware search adjustment
Volatility also affects how much evidence is required from nearby structures.
ATR is converted into a percentage of price:
float currentAtrPercent =
close > 0.0
? averageTrueRange / close * 100.0
: 0.0
When volatility is high, the minimum structural-quality requirement is increased moderately.
Representative logic:
if currentAtrPercent >= 6.0
adaptiveQualityThreshold :=
minimumStructureQualityInput + 8.0
else if currentAtrPercent >= 4.0
adaptiveQualityThreshold :=
minimumStructureQualityInput + 5.0
The purpose is not simply:
Higher volatility = wider search range.
Instead:
Higher volatility = minor nearby structures need stronger evidence before they are allowed to stop the search.
This distinction is important.
Volatility assists the structural search; it does not independently determine support or resistance.
12. Structural quality used by adaptive search
To decide whether search expansion can stop, a separate quality model evaluates candidate clusters.
The quality assessment combines several components:
Number of structural interactions
Average historical reaction
Relative volume participation
Recency
Accumulated structural contribution
A simplified representation is:
float structureQuality =
touchComponent +
reactionComponent +
volumeComponent +
recencyComponent +
baseScoreComponent
The result is bounded to a 0–100 scale.
clampValue(
structureQuality,
0.0,
100.0)
This quality score primarily answers:
"Is this structure meaningful enough for the adaptive search to stop here?"
It is separate from the final displayed strength score.
13. Selecting the final support and resistance
After the adaptive search distance has been determined, the model evaluates all valid clusters inside that range.
For support:
The cluster must be below or near the current price.
It must remain inside the active support search range.
Its structural score is combined with a proximity adjustment.
For resistance, the same process is applied above current price.
The highest-ranked candidate becomes the primary structural level.
This means that the displayed level represents the outcome of:
confirmed pivots → clustering → structural scoring → adaptive distance selection → final ranking
rather than simply selecting the latest high or low.
14. Strength score: what does 0–100 mean?
After the primary support and resistance levels are selected, the model performs a second evaluation.
This stage describes the historical quality of the selected structure .
The strength score considers:
Touch count
Average reaction after historical interactions
Relative volume participation
Recency
Repeated crossings of the level
Fast failed breaks
The positive components are conceptually:
float rawStrengthScore =
touchComponent +
reactionComponent +
volumeComponent +
recencyComponent +
stabilityComponent -
totalPenalty
Repeated crossings reduce the score:
float totalPenalty =
crossingCount *
crossingPenaltyInput +
failedBreakCount *
failedBreakPenaltyInput
The final value is limited to 0–100.
The interface converts it into:
Weak
Medium
Strong
The score should not be interpreted as:
82 points = 82% probability that support will hold.
It does not represent probability, expected return or strategy win rate.
It is a normalized description of historical structural behavior.
15. Why repeated crossings reduce strength
A price level may appear frequently in historical data simply because the market traded through it many times.
That does not necessarily make the level stronger.
A structurally useful support or resistance area usually produces some degree of rejection, recovery or directional response.
For this reason, the script counts repeated close-to-close crossings.
Representative logic:
bool crossedAbove =
olderClose <= level and
newerClose > level
bool crossedBelow =
olderClose >= level and
newerClose < level
if crossedAbove or crossedBelow
crossingCount += 1
Frequent crossings therefore reduce structural strength instead of increasing it automatically.
16. Why support and resistance are displayed as zones
Real market structure rarely operates at one mathematically exact tick.
Several pivots may occur at slightly different prices while still representing the same area.
The script therefore displays:
A center structural level
A surrounding structural zone
Zone width contains two elements.
First, the actual spread of the clustered pivot prices.
Second, a small volatility-sensitive padding:
float zonePadding =
math.max(
selectedLevel *
minimumZoneWidthPercentInput /
100.0,
averageTrueRange *
atrZoneMultiplierInput)
The center line is useful for reference.
The surrounding area is intended to represent the broader price region where structural interaction may occur.
17. Breakout detection uses the previous structure
There is an important implementation detail in breakout detection.
When price breaks resistance, the current resistance calculation may immediately change because current price itself has changed.
If breakout detection used only the newly recalculated structure, the model could lose the level that price actually broke.
The script therefore references the previously confirmed zone:
float previousResistanceZoneUpperBound =
resistanceZoneUpperBound
float resistanceBreakTrigger =
previousResistanceZoneUpperBound *
(1.0 +
breakoutBufferPercentInput /
100.0)
The same principle applies to support breakdowns.
This allows the structural state machine to remember the actual area involved in the break.
18. Resistance does not immediately become support
A confirmed break starts a new structural state.
The model uses named states internally:
const int STATE_NORMAL = 0
const int STATE_BREAKOUT_WAITING_RETEST = 1
const int STATE_RESISTANCE_TO_SUPPORT = 2
const int STATE_BREAKDOWN_WAITING_REBOUND = -1
const int STATE_SUPPORT_TO_RESISTANCE = -2
After resistance is broken:
The previous resistance area is stored.
The model enters a "waiting for retest" state.
Price is monitored for a return toward the old resistance.
If the retest holds, the former resistance may become support.
If price falls back through the old zone, the breakout is treated as failed.
Representative confirmation logic:
bool testedFormerResistance =
low <=
roleReversalUpperBound *
(1.0 +
retestTolerancePercentInput /
100.0)
bool retestHeld =
testedFormerResistance and
close > roleReversalUpperBound
Only after this process can the old resistance be promoted to support.
19. Support-to-resistance uses the opposite process
After support is broken:
The previous support area is stored.
The model waits for a rebound.
Price must test the former support area.
If price is rejected and cannot recover the area, the former support can become resistance.
Representative logic:
bool testedFormerSupport =
high >=
roleReversalLowerBound *
(1.0 -
retestTolerancePercentInput /
100.0)
bool reboundRejected =
testedFormerSupport and
close < roleReversalLowerBound
This creates a distinction between:
price crossed a level
and:
the market actually completed a structural role reversal.
20. Failed breakout and failed breakdown
The script also monitors invalidation after a break.
If resistance is broken but price quickly returns below the former resistance structure, the event can be treated as a failed breakout.
If support is broken but price quickly recovers the former support structure, the event can be treated as a failed breakdown.
These events reset the pending role-reversal process rather than automatically promoting the old structure to a new role.
21. How to use the indicator
A simple workflow is:
Locate the current support
Identify the support area below the current market.
This is the structural area currently considered most relevant by the model.
Locate the current resistance
Identify the active structural resistance above price.
Read the strength
A stronger score indicates that the selected structure has historically shown better structural characteristics under this model.
It does not mean the level cannot break.
Read "Why this level?"
The dashboard shows the number of historical structural interactions and the average subsequent reaction.
This gives a plain-language explanation for why the level has been selected.
Check how far the algorithm searched
For example:
"Below 25% | Above 75%"
means that qualified support was available relatively close below current price, while the model had to inspect a much wider area to find qualified resistance.
Observe the current structural state
The dashboard may report states such as:
"Price is between support and resistance"
"Resistance broken; waiting for a retest"
"Former resistance is currently acting as support"
"Support broken; waiting for a rebound"
"Former support is currently acting as resistance"
22. Practical interpretation
The indicator is designed primarily as a context tool .
For example:
Price approaching strong support does not automatically mean "buy".
It means price is entering an area that has meaningful structural evidence and may deserve closer observation.
Likewise:
Price approaching resistance does not automatically mean "sell".
It identifies an area where historical supply or rejection has been structurally significant.
A trader can then combine that context with his or her own analysis of:
Price action
Volume
Trend
Market regime
Higher-timeframe structure
Risk/reward
Position sizing
Independent fundamental or macro analysis
The script itself does not generate automatic buy or sell orders.
23. Dashboard explanation
The dashboard intentionally avoids exposing every internal statistical variable.
Instead, it translates the model into simpler trading language.
Support
Current selected support level and its strength evaluation.
Why this level?
Shows how many historical structural interactions contributed to the area and the average subsequent upside response.
Resistance
Current selected resistance level and strength evaluation.
Why this level?
Shows historical interactions and the average subsequent downside response.
How far it searched
Shows the active adaptive search range below and above the current market.
Current state
Explains whether price remains between the structures, has broken one of them, is waiting for confirmation, or has completed a role reversal.
24. Main settings
Lookback Bars
Controls how much historical price data is considered when constructing structural clusters.
A longer lookback includes more historical structure but may also retain older information.
Pivot Left Bars / Pivot Right Bars
Control how strict pivot confirmation is.
Larger values generally identify larger structural turns but require more confirmation.
Price Cluster Width %
Controls how close two pivot observations must be before they can belong to the same structural area.
Search Mode
Auto allows support and resistance to determine their own search distances.
Manual uses a fixed maximum distance.
Maximum Auto Range
Defines the maximum distance the adaptive search is allowed to inspect.
Minimum Structure Quality
Controls how meaningful a structure must be before it can stop automatic search expansion.
Minimum Valid Tests
Defines the minimum number of structural observations required for a candidate to qualify during adaptive search.
Reaction Observation Bars
Defines how many bars after a historical pivot are examined when measuring its subsequent price reaction.
Break Confirmation Buffer
Adds a small margin beyond the old structural zone before a break is considered confirmed.
Retest Tolerance
Controls how close price must return to the former structural area during retest/rebound evaluation.
25. Alerts
Alert conditions are provided for:
Resistance break
Support break
Resistance confirmed as support
Support confirmed as resistance
Failed breakout
Failed breakdown
When close confirmation is enabled, structural break events are evaluated on confirmed bars.
26. About repainting and structural updates
This script should not be interpreted as a system that predicts pivots before they are confirmed.
Pivot highs and lows require right-side confirmation bars.
Therefore:
A newly forming pivot is not shown as confirmed structure until sufficient bars exist to confirm it.
Once new market data arrives, the active support and resistance can still change for legitimate structural reasons.
Examples include:
A new confirmed pivot enters the calculation.
Several new observations create a stronger price cluster.
Current price moves enough to change the relevant search region.
An older observation exits the configured lookback window.
A breakout creates a role-reversal state.
This is dynamic structural recalculation, not a promise that current support and resistance will remain fixed forever.
27. Why these components belong together
This script combines several concepts, but they are not independent indicators placed together for convenience.
Each component solves a different stage of the same problem.
Confirmed pivots identify potential structural observations.
Price clustering converts nearby observations into common price areas.
Structural ranking determines which areas contain more meaningful historical evidence.
Adaptive search determines how far the model needs to inspect for an adequate structure.
Reaction analysis measures how price historically responded to that structure.
Strength evaluation summarizes the historical quality of the selected area.
ATR-based zone construction converts an exact center price into a practical market area.
The role-reversal state machine manages what happens after the structure is broken.
The components are therefore sequential stages of one structural support/resistance framework rather than a mashup of unrelated indicators.
28. What is distinctive about this implementation?
The primary design characteristics of this implementation are:
Nearby pivots are aggregated into structural price clusters rather than displayed independently.
Support and resistance use independent adaptive search ranges.
Search expansion depends on structural quality rather than distance alone.
Volatility modifies the evidence required from nearby structures.
Level selection and level-strength evaluation are deliberately separated.
Repeated crossings and failed breaks can reduce structural strength.
Support and resistance are represented as price areas instead of exact single-price barriers.
Break detection references the previous structural zone.
Role reversal requires confirmation through a state machine instead of occurring immediately after a single crossing.
The chart intentionally focuses on the current relevant structure rather than filling the chart with historical event markers.
29. Limitations
No support/resistance algorithm can know with certainty whether a level will hold or fail.
Important limitations include:
Pivot confirmation introduces intentional delay.
Support and resistance may change as new information becomes available.
Historical reaction does not guarantee future reaction.
A high strength score is not a probability of success.
Very new instruments with limited history may not contain enough structural observations.
Strong trend transitions can invalidate historical structures quickly.
Volume-based components depend on the quality and meaning of the instrument's volume data.
Different timeframes can produce materially different support and resistance structures.
Synthetic or non-standard chart types may use transformed OHLC values and can therefore produce different structural results.
30. Final note
Support and resistance should be understood as areas of market interaction, not guaranteed turning points.
The purpose of this indicator is to organize historical structure and reduce it into a small number of currently relevant price areas.
It is an analytical framework, not an automatic trading system.
This script is intended for market-structure analysis and educational use. It does not constitute investment advice, a recommendation, or a guarantee of future market performance.
────────────────────────────────────
中文说明
1. 这个指标是什么?
Adaptive Structure Support & Resistance 是一个基于市场历史结构,自动寻找当前价格上下方关键支撑与压力区域的分析工具。
它解决的并不是:
“历史上哪里出现过高点和低点?”
而是试图解决一个更实际的问题:
“历史上这么多高低点里,哪些价格区域到现在仍然具有足够的结构意义,值得当前继续关注?”
所以,这个指标不是简单地把每一个 Pivot High 和 Pivot Low 都画成水平线。
完整计算过程包括:
识别已经确认的历史高低结构。
把价格相近的多个结构合并成一个价格簇。
评价不同价格簇的历史结构意义。
分别判断寻找支撑和压力到底需要看多远。
从有效搜索范围中选择当前更重要的支撑与压力。
评价被选中位置过去的实际价格反应。
将精确价格转化为更加符合实际交易的撑压区域。
价格突破或跌破以后保存原结构。
通过回踩或反抽确认撑压角色是否真正发生转换。
因此,Pivot 只是整个模型的第一步,而不是最终结果。
2. 为什么要做这套模型?
传统的自动支撑压力工具经常存在几个问题。
画出来的线太多
如果把每个前高前低全部保留下来,时间稍长以后主图会出现大量水平线。
不仅影响阅读,而且其中很多价格其实属于同一个结构。
单个高低点不一定有意义
市场临时出现一个局部最高点或最低点,并不能说明这个价格一定存在真正的供需结构。
如果不同时间价格多次来到相近区域并产生反应,它所代表的结构意义通常更加完整。
不同标的不能使用完全相同的搜索距离
有些股票距离现价下方 20% 就存在非常明确的历史结构。
有些高波动、长期趋势较强的股票,却可能需要向下或者向上看 50%、75% 甚至更远,才能找到真正有意义的位置。
距离最近的不一定最重要
现价附近可能存在一个很小的 Pivot,但稍微远一点的位置可能历史上被多次验证,并且每次都出现较大价格反应。
突破并不等于立刻完成撑压转换
突破压力一次,不应该马上认为压力已经变成支撑。
跌破支撑一次,也不应该马上认为原支撑已经成为新压力。
所以这套模型的设计目标不是“尽量多找线”。
而是:
尽量把复杂的历史价格结构压缩成少量、当前更值得关注的支撑和压力区域。
3. 可以用在哪里?
只要历史价格结构具有一定参考意义,理论上都可以使用,例如:
股票
指数
ETF
期货
外汇
加密资产
其他具有正常历史行情数据的流动性标的
不同周期看到的是不同级别的结构。
例如:
15分钟图得到的是偏短线结构。
日线得到的是波段级结构。
周线得到的是更长期的历史结构。
指标不会把15分钟的支撑自动解释成日线支撑。
所有计算都基于当前图表所使用的周期。
4. 第一步:确认历史结构高低点
模型首先通过已经确认的 Pivot High 与 Pivot Low 获取历史结构观察点。
核心逻辑:
float pivotHigh = ta.pivothigh(
high,
pivotLeftBarsInput,
pivotRightBarsInput)
float pivotLow = ta.pivotlow(
low,
pivotLeftBarsInput,
pivotRightBarsInput)
这里最重要的是“确认”。
一个刚刚形成的高点不会马上成为正式压力结构。
一个刚刚形成的低点也不会马上成为正式支撑结构。
需要等待右侧一定数量的K线完成确认。
所以模型主动接受一定的确认延迟,用来减少把尚未成立的短期极值直接当成重要结构的情况。
5. 第二步:把相近价格合并成一个结构
如果历史上存在:
12.01
12.05
12.09
这三个低点,实际上它们很可能描述的是同一片支撑区域,而不是三条完全独立的支撑线。
所以系统会计算不同 Pivot 之间的价格距离:
float distancePercent =
math.abs(price - clusterPrice) /
clusterPrice *
100.0
if distancePercent <= mergePercent
matchingIndex := clusterIndex
如果距离足够接近,就把它们合并到同一个价格结构中。
这样模型关注的就不再是:
“12.01碰过一次”
而是:
“12元附近这个区域历史上反复出现过结构反应。”
6. 第三步:给历史结构进行初步排序
并不是所有 Pivot 对结构的重要性都一样。
模型会考虑:
当时成交量相对大小
这个结构距离现在有多久
多个 Pivot 是否属于同一个价格区域
基础贡献大致表现为:
float pivotBaseScore =
1.0 +
volumeWeightInput * volumeRatio +
recencyWeightInput * recencyFactor
多个相近 Pivot 被合并后,它们的结构贡献会累积。
最后选择当前结构时,还会给予距离现价较近的位置一定加分:
float candidateRank =
accumulatedBaseScore +
proximityBonusInput *
proximityFactor
但这里需要注意:
“距离近”只是一个因素,并不是谁离现价最近就一定选择谁。
7. 成交量在这里做什么?
模型会把 Pivot 当时的成交量与近期平均成交量进行比较。
例如:
float volumeRatio =
pivotAverageVolume > 0.0
? math.min(
pivotVolume / pivotAverageVolume,
3.0)
: 1.0
如果某个结构形成时伴随更明显的市场参与,它可以得到额外权重。
但是成交量并不会单独决定支撑压力。
它只是结构评价中的一个辅助信息。
8. 历史触碰以后到底有没有真正反应?
一个位置历史上碰过很多次,并不代表它一定很重要。
关键还要看:
碰到以后,价格到底有没有发生真正的反向运动?
对于历史支撑 Pivot,系统观察之后一定K线范围内出现的最大向上反应。
核心思想:
float reactionPercent =
(highestPostPivotPrice / pivotPrice - 1.0) *
100.0
对于历史压力,则计算后续最大回落:
float reactionPercent =
(pivotPrice - lowestPostPivotPrice) /
pivotPrice *
100.0
这样能够区别:
一个历史上经常出现,但价格几乎没有明显反应的位置。
一个每次靠近以后,价格都出现较明显反转或回撤的位置。
9. 为什么搜索距离必须智能调整?
这是这个模型比较重要的一部分。
固定使用25%的搜索范围并不适合所有标的。
固定使用100%,又可能在不必要的情况下把非常遥远的历史结构纳入计算。
所以自动模式采用:
25%
50%
75%
100%
逐级寻找。
核心映射逻辑:
if distancePercent <= 25.0
result := 25.0
else if distancePercent <= 50.0 and maximumRangePercent >= 50.0
result := 50.0
else if distancePercent <= 75.0 and maximumRangePercent >= 75.0
result := 75.0
else if distancePercent <= 100.0 and maximumRangePercent >= 100.0
result := 100.0
如果25%以内已经存在合格结构,就可以停止。
如果没有,就扩大到50%。
依次类推。
10. 支撑和压力是分别搜索的
支撑和压力并不会强制使用同一个范围。
完全可能出现:
下方支撑搜索:25%
上方压力搜索:75%
它表达的意思是:
下方距离现价比较近的地方已经存在足够明确的历史支撑结构。
但是上方近距离没有达到要求的压力,所以模型继续向更远的位置寻找。
11. 为什么不是25%以内随便有个Pivot就停止?
如果只要附近出现一个 Pivot 就停止寻找,所谓智能搜索就没有意义。
因此,候选结构必须同时满足最低触碰次数和最低结构质量。
例如:
bool qualifiedStructure =
touchCount >= minimumStructureTouchesInput and
structureQuality >= adaptiveQualityThreshold
这意味着:
附近有结构 ≠ 附近有足够好的结构。
如果近端只是一个很弱的小级别价格点,系统仍然可以继续扩大搜索范围。
12. 波动率为什么也参与?
系统使用 ATR 相对于当前价格的比例观察标的自身波动程度。
float currentAtrPercent =
close > 0.0
? averageTrueRange / close * 100.0
: 0.0
高波动股票附近出现小 Pivot 非常正常。
因此,对于高波动标的,系统会适当提高“附近结构足够好”的要求。
例如:
if currentAtrPercent >= 6.0
adaptiveQualityThreshold :=
minimumStructureQualityInput + 8.0
else if currentAtrPercent >= 4.0
adaptiveQualityThreshold :=
minimumStructureQualityInput + 5.0
这里不是:
“ATR越高,搜索距离一定越远。”
而是:
“波动越高,附近的小结构必须更有说服力,才能阻止系统继续向外寻找。”
13. 智能搜索中的结构质量怎么计算?
用于决定“是否还要继续扩大搜索范围”的结构质量,主要包含:
历史触碰次数
触碰后的平均反应
相对成交量
结构新旧程度
多个结构累积后的基础得分
可以简化理解为:
float structureQuality =
touchComponent +
reactionComponent +
volumeComponent +
recencyComponent +
baseScoreComponent
最后压缩到0–100:
clampValue(
structureQuality,
0.0,
100.0)
这个分数主要解决的是:
“这个位置够不够好,好到可以不用继续向外找了?”
14. 最终支撑压力怎么选?
确定搜索范围以后,系统会重新检查范围内所有候选结构。
支撑必须位于现价下方或附近。
压力必须位于现价上方或附近。
最后比较:
历史结构累积得分
与当前价格的距离
选择当前 Rank 更高的结构。
所以最终看到的线经历了:
Pivot确认
→ 相近价格聚类
→ 结构评价
→ 智能搜索距离
→ 范围内重新排序
→ 最终支撑压力
15. 0–100强度分数到底是什么意思?
当最终支撑压力确定以后,系统会再做一次独立评价。
这一部分不是用来重新选择线,而是告诉你:
“现在已经选中的这条结构,历史质量到底怎么样?”
主要考虑:
触碰次数
历史平均反应
相对成交量
结构是否较新
是否经常被来回穿越
是否出现过快速失败突破
大致计算结构:
float rawStrengthScore =
touchComponent +
reactionComponent +
volumeComponent +
recencyComponent +
stabilityComponent -
totalPenalty
其中反复穿越和失败突破会扣分:
float totalPenalty =
crossingCount *
crossingPenaltyInput +
failedBreakCount *
failedBreakPenaltyInput
最后得到0–100,并转化成:
弱
中
强
但是一定不要理解成:
“82分 = 未来82%概率守住。”
它不是胜率,也不是未来预测概率。
它只是对历史结构质量进行标准化后的评分。
16. 为什么反复穿越反而扣分?
有些价格历史上出现很多次,仅仅是因为市场一直在这个位置上下震荡。
如果价格能够非常轻松地不断穿过这个位置,它未必是真正强支撑或强压力。
所以系统统计价格穿越中心结构的情况:
bool crossedAbove =
olderClose <= level and
newerClose > level
bool crossedBelow =
olderClose >= level and
newerClose < level
穿越越频繁,结构稳定性评价越低。
17. 为什么画的是区域,不只是一条线?
真实交易中,很少存在一个价格精确到最小报价单位以后永远有效。
历史多个 Pivot 本身就可能分布在一个小区间里。
所以模型保留:
中心结构价格
结构区域
区域宽度由:
历史 Pivot 聚类本身的价格范围
少量 ATR 波动缓冲
共同决定。
核心思想:
float zonePadding =
math.max(
selectedLevel *
minimumZoneWidthPercentInput /
100.0,
averageTrueRange *
atrZoneMultiplierInput)
中心线用于定位。
阴影区域用于表达真实市场中的价格博弈带。
18. 为什么突破使用上一根K线的压力?
这是结构判断里很重要的一点。
当价格突破压力以后,如果马上重新计算当前压力,那么旧压力可能已经被系统替换。
这样反而不知道价格刚刚突破的到底是哪一个结构。
所以突破判断使用突破之前已经存在的压力区域:
float previousResistanceZoneUpperBound =
resistanceZoneUpperBound
并基于它计算突破标准:
float resistanceBreakTrigger =
previousResistanceZoneUpperBound *
(1.0 +
breakoutBufferPercentInput /
100.0)
支撑跌破同理。
19. 突破压力以后为什么不能马上变成支撑?
系统内部使用一个状态机:
const int STATE_NORMAL = 0
const int STATE_BREAKOUT_WAITING_RETEST = 1
const int STATE_RESISTANCE_TO_SUPPORT = 2
const int STATE_BREAKDOWN_WAITING_REBOUND = -1
const int STATE_SUPPORT_TO_RESISTANCE = -2
突破压力以后:
保存原来的压力区域。
进入“等待回踩”状态。
观察价格是否重新回来测试原压力。
如果回踩以后守住,才确认压力转支撑。
如果重新跌回原结构下方,则视为突破失败。
回踩逻辑类似:
bool testedFormerResistance =
low <=
roleReversalUpperBound *
(1.0 +
retestTolerancePercentInput /
100.0)
bool retestHeld =
testedFormerResistance and
close > roleReversalUpperBound
20. 支撑转压力同样需要确认
支撑跌破以后:
保存原来的支撑。
等待价格反抽。
观察反抽是否重新接触原支撑区域。
如果无法重新站回,才确认原支撑变成压力。
例如:
bool testedFormerSupport =
high >=
roleReversalLowerBound *
(1.0 -
retestTolerancePercentInput /
100.0)
bool reboundRejected =
testedFormerSupport and
close < roleReversalLowerBound
因此模型会区分:
“价格只是穿过了一下”
与:
“原来的市场结构真正完成了角色转换”
21. 实际怎么使用?
最简单的使用顺序:
先看支撑在哪里
这是当前算法认为下方更值得关注的历史结构区域。
再看压力在哪里
这是当前上方更值得关注的历史结构区域。
看强度
强度越高,代表这个结构在模型评价中具有更好的历史表现。
但再强也可能被突破。
看“为什么是它?”
这里会直接告诉你历史上大致碰过多少次,以及碰到以后平均出现多大的反向运动。
看“算法看了多远”
例如:
下方25%|上方75%
意味着下方较近就找到了合格支撑,但是上方需要看更远,才找到合格压力。
最后看“现在怎么看”
这里会告诉你目前属于:
价格仍在支撑压力之间;
突破压力等待回踩;
原压力已经转为支撑;
跌破支撑等待反抽;
原支撑已经转为压力;
等结构状态。
22. 应该如何理解支撑压力?
这个指标最适合作为“位置和结构背景工具”。
例如:
价格到了强支撑,不等于自动买入。
它代表价格已经进入一个历史结构相对重要的位置,值得进一步观察。
同样:
价格到了强压力,也不等于必须卖出。
它代表价格进入过去曾经出现明显供给或回落反应的区域。
后续仍然可以结合自己的:
价格行为
成交量
趋势结构
大周期方向
市场环境
赔率
风险控制
仓位管理
共同判断。
23. 右上角面板怎么看?
我刻意没有把所有内部统计数据全部堆在面板上。
面板只保留实际使用中更容易理解的信息。
支撑位置
当前支撑在哪里,以及它的结构强弱。
为什么是它?
告诉你历史触碰次数和触碰以后平均反弹幅度。
压力位置
当前压力在哪里,以及强弱。
为什么是它?
告诉你历史触碰次数和之后平均回落幅度。
算法看了多远
显示支撑和压力分别使用了多大的搜索范围。
现在怎么看
使用大白话告诉你当前市场与撑压之间处于什么结构状态。
24. 常用参数怎么理解?
Lookback Bars / 回看K线数
决定使用多少历史K线寻找结构。
周期越长,可以考虑更久以前的结构,但也可能保留更多较旧的信息。
Pivot Left / Right Bars
决定 Pivot 判断严格程度。
数值越大,一般意味着只识别更明显的结构转折,同时确认速度也会更慢。
Price Cluster Width %
决定两个历史 Pivot 相差多少以内可以被认为属于同一结构。
Search Mode
Auto:自动决定支撑和压力分别要搜索多远。
Manual:手动固定搜索范围。
Maximum Auto Range
智能搜索允许向外扩展到的最大距离。
Minimum Structure Quality
决定附近结构必须达到多高质量,才能让系统停止继续扩大搜索。
Minimum Valid Tests
智能搜索中,一个结构至少需要多少次历史观察才能成为有效候选。
Reaction Observation Bars
计算历史 Pivot 出现以后,向后观察多少根K线的价格反应。
Break Confirmation Buffer
突破原撑压区域以后,需要额外超过多少缓冲才认定为有效突破。
Retest Tolerance
回踩或反抽过程中,允许价格距离原结构存在多大误差。
25. 警报
指标支持以下 Alert:
有效突破压力
有效跌破支撑
压力确认转支撑
支撑确认转压力
突破失败
跌破失败
如果启用了收盘确认,那么对应结构事件会等待K线确认以后判断。
26. 关于重绘和结构变化
这个指标不是提前预测 Pivot 的工具。
Pivot 本身必须等待右侧K线确认。
因此:
刚刚形成的最高点或最低点,不会在尚未确认时被当成已经成立的正式结构。
但是当前支撑压力未来仍然可能发生变化。
原因包括:
新的 Pivot 被确认。
新的历史触碰让另一个价格簇变得更重要。
现价移动以后,当前最相关的结构发生变化。
旧数据离开回看范围。
价格突破以后发生撑压角色转换。
这是动态结构模型正常的重新评价过程。
27. 为什么这些模块必须放在一起?
虽然指标中包含多个计算部分,但它们并不是几个无关指标简单拼接。
每一个部分都负责解决同一个支撑压力问题中的不同阶段。
Pivot :找出可能的历史结构观察点。
价格聚类 :把相近观察点合并成真正的价格区域。
结构排序 :判断哪些区域具有更多历史证据。
智能搜索 :判断为了找到有效结构到底需要看多远。
历史反应 :判断价格过去触碰以后是否真的产生明显反应。
强度评分 :评价最终选中结构过去的整体质量。
ATR区域 :把一个中心价格转化为更加符合实际市场的撑压带。
状态机 :处理结构突破以后,到底是真突破、失败突破还是完成撑压转换。
因此:
这是一条连续的结构计算链,而不是把多个独立指标组合到同一个脚本中。
28. 这套实现有什么特点?
主要设计特点包括:
不会把所有 Pivot 独立画线,而是先进行价格聚类。
支撑和压力可以使用完全不同的智能搜索距离。
是否扩大搜索范围由结构质量决定,而不是只有距离。
高波动环境会提高附近小结构的有效要求。
“选哪条线”和“这条线有多强”是两个独立计算阶段。
反复穿越会降低结构评分,而不是因为出现次数多就自动变强。
支撑压力使用区域表达,而不是绝对精确价格。
突破使用之前已经存在的结构,而不是突破以后重新计算出的新位置。
撑压转换必须经过回踩/反抽状态确认。
主图只重点展示当前结构,不保留大量历史突破标签干扰图表。
29. 使用限制
任何支撑压力算法都无法提前确定某个位置未来一定守住或者一定突破。
需要注意:
Pivot 确认天然存在延迟。
随着市场产生新数据,当前支撑压力可能发生变化。
历史上反应明显,不代表未来一定继续反应。
强度分数不是未来成功概率。
刚上市或者历史数据很少的标的可能缺少足够结构样本。
趋势发生巨大变化以后,过去有效的结构可能迅速失效。
成交量相关评价依赖该标的成交量数据本身的有效性。
不同周期得到的撑压位置可以完全不同。
非标准K线可能使用经过转换的 OHLC,因此计算结果可能与真实成交价格图存在差异。
30. 最后
支撑和压力应该被理解为市场可能发生博弈的区域,而不是保证发生反转的价格。
这个指标的核心目标,是把复杂的历史市场结构整理成少量、当前更值得观察的位置。
它是市场结构分析框架,而不是自动交易系统。
本指标仅用于市场结构研究与辅助分析,不构成投资建议、收益承诺或任何形式的买卖推荐。 Indicador

Previous Day, Week & Month Levels [ITA]🟠 OVERVIEW
Previous Day, Week & Month Levels plots the high and low of each completed higher timeframe period and keeps them on the chart until price trades through them. Once a level is taken, it fades to grey instead of disappearing, so the chart separates liquidity that is still resting from liquidity that has already been collected.
The indicator covers daily, weekly and monthly periods independently, with optional midpoints for each range. This lets an intraday trader run daily levels alone, or stack all three groups to see how short-term and higher timeframe references line up.
🟠 CONCEPTS
* Previous Level - The high or low of the last completed daily, weekly or monthly candle, pulled from the higher timeframe regardless of the chart timeframe in use.
* Untaken Level - A level that price has not traded through since its period closed. Drawn at full opacity because the orders resting behind it are still there.
* Taken Level - A level that price has traded through during the current period. Recolored grey to show the liquidity has been collected and the level has lost its role as a target.
* Level Reset - Each group tracks its own taken state and resets when a new period begins. Daily flags clear every session while weekly and monthly flags run on their own cycles.
* Midpoint - The 50% level of a previous range, marking the equilibrium of that period rather than its extremes.
🟠 FEATURES
* Multi-Period Levels - Plots previous day, week and month highs and lows, each group toggleable on its own.
* Taken Level Fading - Automatically recolors any level that price trades through, leaving untouched levels highlighted.
* Optional Midpoints - Adds the 50% level of each enabled range for equilibrium reference.
* Level Labels - Tags each line with its name on the right edge of the chart, with configurable size.
* Level Alerts - Fires when price trades above a previous high or below a previous low.
🟠 HOW TO USE
* Run daily levels alone for intraday work, or enable weekly and monthly for a broader structural view.
* Treat bright levels as unfinished business and faded levels as history. What stays highlighted is where liquidity has not yet been taken.
* Watch for clusters where a daily level sits close to a weekly one. A single move that clears both tends to produce a sharper reaction than clearing either alone.
* Use midpoints as a filter. Price rotating around the midpoint of the previous day often points to balance rather than direction.
* Adjust Extend Right if the levels project too far past the current candle or stop short of it.
🟠 CONCLUSION
Previous Day, Week & Month Levels combines multi-period reference levels with automatic tracking of which levels have already been traded through. Instead of showing every level identically, it separates active liquidity from collected liquidity, giving traders a clear view of which reference points are still relevant to the current session. Indicador

[SkuldX] SFP + Auto S&RSkuldX SFP + Auto S&R — Institutional Liquidity Sweep at Validated Structure
by SkuldX Trading Systems
What is it?
SkuldX SFP + Auto S&R combines two powerful concepts into a single indicator. It automatically identifies significant support and resistance levels by clustering historical pivot points — and then monitors those levels exclusively for Swing Failure Pattern events. The result is a significantly higher quality signal filter compared to standard SFP detection: every sweep you see on the chart is happening at a price level where the market has already demonstrated structural significance multiple times.
The problem with standard SFP detection
A basic SFP indicator sweeps any local high or low regardless of whether that level has any structural importance. This generates many signals at noise levels that institutions have no reason to target. The most powerful SFP setups occur specifically at levels where liquidity has accumulated over time — where stop orders from multiple previous reactions are clustered and waiting to be harvested.
SkuldX SFP + Auto S&R solves this by only triggering when a sweep occurs at an automatically validated S&R cluster.
How the S&R engine works
The indicator scans the configured history window and identifies all pivot highs and lows — price points where the market reversed direction with enough significance to form a clear swing. These pivots are then grouped into clusters: any two pivots within the cluster tolerance percentage of each other are merged into a single level, and their average price becomes the cluster center.
Each cluster is assigned a touch count — the total number of times price has visited that zone across both pivot formations and raw bar touches. Clusters that meet the minimum touch threshold become validated S&R levels and are drawn on the chart as horizontal lines.
The levels are sorted by touch count and only the strongest ones up to your configured maximum are shown. A label at the right edge of each line displays the price and touch count in brackets — for example 2415.50 means that level has been touched five times and carries significant institutional memory.
How the SFP detection works
On every bar the indicator identifies the nearest validated S&R level above price and the nearest validated S&R level below price. It then checks whether the current candle has swept through either of those levels while closing back inside them.
Bearish SFP fires when the candle wick extends above the nearest S&R resistance level but the candle closes below it. The upper wick must meet the minimum size threshold as a percentage of the total candle range, and the breach above the level must meet the minimum breach threshold. Both conditions together ensure the sweep was meaningful rather than a minor tick-through.
Bullish SFP fires when the candle wick extends below the nearest S&R support level but the candle closes above it, with the lower wick and breach both meeting their minimum thresholds.
What you see on the chart
Grey lines — validated S&R levels with touch count labels. These are your structural reference zones. The more touches a level shows, the more liquidity has accumulated there and the more significant a sweep of that level becomes.
SFP label — appears above or below the candle at the moment of detection. Shows the signal direction, the price of the swept level, and its touch count. Higher touch count at the swept level means higher probability of a sustained reversal.
Rejection zone (box) — shaded area between the wick extreme and the S&R level. This is the precise zone where stop orders were triggered and institutional positions were likely built. The zone extends to the right for a configurable number of bars.
Dashed line — marks the specific S&R level that was swept, making it easy to track which structural zone triggered the signal.
Settings reference
S&R Detection group
Pivot Lookback — how many bars on each side a pivot must be the extreme to qualify. Higher values find more significant swing points but confirm later. Default 10.
Cluster Tolerance % — maximum distance between two pivots to be grouped into the same cluster. Default 0.3%. Increase for volatile instruments where price rarely touches the exact same price twice.
Min Touches for Valid Level — minimum touch count required for a cluster to be drawn and used for SFP detection. Default 2. Increase to 3 or 4 for stricter structural requirements.
Max Levels to Show — limits the number of S&R lines displayed. The strongest levels by touch count are always shown first.
S&R History Lookback — how many bars of history to scan for pivots. Default 300. Increase for higher timeframes where significant levels form slowly.
SFP Filters group
Min Wick Size % of candle — the rejection wick must be at least this percentage of the total candle range. Prevents weak rejections from triggering signals.
Min Breach Size % of level — the wick must extend at least this percentage beyond the S&R level. Ensures the sweep was meaningful enough to trigger stop orders.
Show Bullish / Bearish SFP — independent toggles for each direction.
SFP Display group
Show Labels — toggles signal labels
Show Rejection Zone — toggles the sweep zone box
Zone Extend — how many bars right the zone and line extend
Label Size / Zone Transparency / Line Width — visual customization
Bullish / Bearish Color — independent colors for each direction
How to use it in practice
Reading the levels — scan the grey S&R lines before any signal appears. Levels with 4+ touches are the most significant targets. These are where institutions are most likely to engineer a sweep. When price approaches one of these levels, heighten your attention.
Reading the signal — when an SFP fires, check the touch count in the label. A sweep at a 2-touch level is interesting. A sweep at a 6-touch level is significant. The touch count is the single most important quality indicator for the setup.
Entry timing — the signal fires on candle close. The most direct entry is at the open of the next candle in the reversal direction. A more conservative approach waits for the following candle to confirm continuation before entering.
Stop placement — place the stop-loss beyond the wick tip, outside the rejection zone. The zone itself tells you where institutional positioning occurred — price returning beyond that zone invalidates the entire setup premise.
Take-profit targets — use the next S&R level in the direction of the trade as the primary target. The indicator shows you all significant levels simultaneously, making it straightforward to identify the next structural obstacle.
Calibrating for your instrument — start with default settings and observe whether signals appear at levels that look structurally significant to you visually. If too many signals appear at noise levels, increase Min Touches to 3 or raise the wick and breach thresholds. If signals are too rare, reduce Pivot Lookback or increase Cluster Tolerance.
Timeframe guidance — on 15m the lookback of 300 bars covers approximately 75 hours. On 1h it covers 12.5 days. Adjust S&R History Lookback proportionally to ensure the indicator scans enough price history to build meaningful clusters.
Part of the SkuldX Suite
SkuldX SFP + Auto S&R is designed to work alongside the full SkuldX indicator suite. The most reliable setups emerge when multiple layers of context align:
A bullish SFP at a 4+ touch S&R level that coincides with the Asian Low from SkuldX Sessions carries double structural significance — both the automated cluster and the session boundary agree on the level
A bearish SFP at a high-touch resistance zone with ADR Used % above 85% from SkuldX ADR Levels signals both a liquidity sweep and statistical range exhaustion simultaneously
An SFP confirmed by a Bullish or Bearish Trend reading in SkuldX OI Delta — new positions opening in the reversal direction — adds institutional conviction that the sweep was deliberate rather than random
The touch count shown in the SFP label directly complements the Touch Counter module in SkuldX Level Patterns, providing consistent structural analysis across both manual and automated level detection
Indicador

Alpha S/R Channel StrategyAlpha S/R Channel Strategy (ASRC)
Mean-reversion strategy trading pullbacks to a dynamic Higher Timeframe EMA channel. Confirms exhaustion via Engulfing & Pin Bar patterns, with Pin+Engulf combo overriding trend filters to capture institutional liquidity grabs. Features optional RSI, BB width, and inverted Squeeze Momentum filters. Includes adaptive position sizing, partial TP, breakeven stops, session trade limits, no-trade windows, day/weekend close, and Friday trading control.
📌 Strategy Overview
Alpha S/R Channel Strategy is a dual‑timeframe mean‑reversion strategy that identifies high‑probability reversal setups by combining a dynamic channel derived from a Higher Timeframe EMA with high‑conviction candlestick patterns (Engulfing and Pin Bar).
The strategy waits for price to retrace to a dynamic value area (the channel) and confirms exhaustion through candlestick patterns before entering—capturing pullbacks within the prevailing trend while avoiding counter‑trend trades.
🧠 Unique Edge – Why This Mashup Works
Most trend‑following strategies chase breakouts and get caught in false moves. Most engulfing strategies ignore the bigger picture and enter too early. This strategy solves both problems by combining these components in a specific sequence:
1. Dynamic EMA Channel (The Value Area)
Instead of using static support/resistance, the strategy constructs a dynamic channel around a Higher Timeframe EMA. The channel width adapts to volatility using three modes:
- Percentage – width as % of current price.(price * (channelWidthPct / 100) )
- ATR Multiplier – width based on ATR from the Higher Timeframe.
- Fixed – static price distance.
Why this matters: The HTF EMA represents the "fair value" or equilibrium price. When price pulls back to this zone, it's statistically more likely to resume the trend rather than reverse.
-------------------------------------------------------------------
2. Channel Break + Candlestick Confirmation (The Trigger)
The strategy enters only when price returns to the channel AND shows exhaustion:
- Bullish Engulfing – Current green candle engulfs previous red/small green candle
- Bearish Engulfing – Current red candle engulfs previous green/small red candle
- Pin Bar + Engulfing Combo – Pin bar sweeps recent high/low and is followed by an engulfing pattern
Why this matters: The channel provides the context (where price should reverse). The candlestick patterns provide the confirmation (that reversal is actually happening). Using both drastically reduces false signals.
-------------------------------------------------------------------
3. Optional Multi‑Layer Filters (The Quality Control)
The strategy includes configurable filters that can be enabled/disabled:
1- EMA Lower TF – Ensures micro‑trend alignment (longs above EMA, shorts below)
However, there is a critical override:
🔄 Pin Bar + Engulfing Combo OVERRIDES the EMA Confirmation
When a Pin Bar sweeps the N‑bar high/low (proving a breakout attempt failed) and is immediately followed by an Engulfing pattern on the next candle, this combo represents a "double confirmation" of exhaustion that bypasses the EMA filter.
Why this is a breakthrough:
Strong institutional reversals (liquidity grabs) often happen against the short‑term EMA trend. A pure trend‑following strategy with a strict EMA filter would miss these reversals because price is moving against the EMA.
2- Higher Timeframe EMA – Ensures long‑term trend alignment
This acts as a "trend filter on top of the trend filter" – preventing entries that go against the even larger market structure. Users can select a separate timeframe (e.g., 1H) with its own EMA length for additional confirmation.
3- RSI – Prevents buying above 70 and selling below 30
4- Bollinger Bands – Blocks entries during low volatility (sideways markets)
5- Squeeze Momentum – This strategy uses an inverted Squeeze Momentum logic:
"val < 0 → Longs allowed, Shorts blocked"
"val > 0 → Shorts allowed, Longs blocked"
"val == 0 → Both allowed"
This inversion is intentional. The strategy is mean‑reversion based—it waits for momentum to become overextended and then trades against that momentum
These filters are optional because different assets and market conditions require different levels of confirmation. The user has full control.
-------------------------------------------------------------------
4. Comprehensive Risk Management
The strategy includes:
- Position Sizing – Fixed percentage of equity per trade (separate for first and second entry)
- Pyramiding – Allows up to 2 positions in the same direction (second trade uses lower risk)
- Multiple SL Options – Low-High, Swing high/low, Channel, Fixed distance
- Trade Counter Reset – Resets at session starts for scalping timeframes, daily for swing
- No‑Trade Windows – Blocks entries during end‑of‑day volatility (active only for TF ≤ 15m)
- Day/Week End Closing – Closes positions before gaps (configurable by timeframe)
- Partial Take Profit – Closes a configurable percentage (default: 50%) at a specified R:R ratio (default: 1:2), allowing the remainder to run to the full target (default: 1:3)
- Breakeven Stop – Optionally moves the stop loss to breakeven when the first TP level is reached, protecting the remaining position from turning into a loss
Why this matters: The risk controls ensure survivability across different market conditions. Also Breakeven protection reduces the risk of winning trades turning into losers.
-------------------------------------------------------------------
📊 How It Works
1. Dynamic Channel Calculation
The strategy constructs a channel around an Exponential Moving Average (EMA) from a selected Higher Timeframe:
- EMA – Calculated on the Higher Timeframe
- Channel Width – Adaptive based on volatility (Percentage, ATR, or Fixed)
- Upper Band = EMA + (Width / 2)
- Lower Band = EMA - (Width / 2)
Channel Width Modes:
- Percentage – Width = Price × (User‑defined %)
- ATR Multiplier – Width = ATR(14) × Multiplier
- Fixed – Width = Static distance
-------------------------------------------------------------------
2. Entry Signal Detection
Trades are executed on the Lower Timeframe (default: 5m) when all conditions are met:
Pattern Requirements (One of the following):
- Bullish Engulfing: Current green candle completely engulfs previous bearish or small green candle
- Bearish Engulfing: Current red candle completely engulfs previous bullish or small red candle
- Pin Bar + Engulfing Combo: Pin bar sweeps recent high/low AND is followed by engulfing pattern (Overrides LTF EMA)
# Engulfing Filters:
Body Only – Only bodies must engulf (not full range)
Min/Max Range – Configurable via Percentage, ATR, or Fixed
Gap Allowance – Controls how much gap is allowed in the wrong direction
Previous Range % – Limits the size of the prior candle when it's in the same color
# Pin Bar Detection:
- Wick/Body Ratio (default: 3.0) – Wick must be 3× larger than body
- Max Body/Range (default: 0.20) – Body must be ≤20% of total range
- Min Wick/Range (default: 0.70) – Wick must be ≥70% of total range
- Sweep Lookback (default: 10 bars) – Pin bar must sweep a recent high/low
Min Pin Bar Range % – Pin bar must meet a minimum size threshold
# Channel Proximity:
Price must be within the channel boundaries (open inside)
-------------------------------------------------------------------
3. Confirmation Filters (All Optional)
- Lower Timeframe EMA : Longs require price > EMA; Shorts require price < EMA (overridden by Pin+Engulf combo)
- Higher Timeframe EMA : Ensures long‑term trend alignment (longs above HTF EMA, shorts below)
- RSI : Prevents longs above 70; Prevents shorts below 30
- Bollinger Bands : Blocks entries when BB width < threshold (low volatility)
- Squeeze Momentum : Ensures momentum matches trade direction (inverted logic)
-------------------------------------------------------------------
4. Risk & Position Management
# Position Sizing:
- First Trade – Fixed % of equity (default: 2%)
- Second Trade – Separate % of equity (default: 1%)
- Position size = (Account Risk) / (Entry – SL Distance)
# Friday Trading:
- Allow Friday Trading (default: Disabled) – When disabled, no new trades will be opened on Fridays. Existing positions are not affected. This helps avoid weekend gap risk as markets close for the week.
# Stop‑Loss Options:
1- Low-High : Entry bar low/high ± buffer
2- Swing high/low : N-bar low/high ± buffer
3- Channel : Channel band ± buffer
4- Fixed distance : Fixed price distance from entry
# Take Profit:
- Main R:R ratio (default: 1:3)
- Separate R:R for second trade (default: 1:3)
# Trade Counter Reset:
TF ≤ 15m – Resets at Asia (20:00 NY), London (03:30 NY), New York (09:30 NY)
TF > 15m – Resets once per day at session start
# No‑Trade Window:
- Active only for TF ≤ 15m (16:45–19:05 NY time)
- Protects against end‑of‑day volatility spikes
# Close All Positions:
- TF ≤ 15m – Can close at day end and/or week end (configurable)
- 15m < TF ≤ 240m – Week end only
- TF > 240m – Feature disabled
# Entry Spacing:
- Minimum Bars Between Entries (default: 4) – Prevents multiple entries on the same bar or too close together, reducing the impact of whipsaw on tightly clustered signals
⚙️ Default Settings – Optimized for XAUUSD (Gold)
All default values have been specifically calibrated for Gold's typical volatility and intraday structure.
Setting \ Default \ Why This Works for Gold
-----------------------------------------------------------------------------------
Higher Timeframe \ 15m \ Gold's intraday rhythm operates on 15‑minute cycles. This timeframe captures the balance between institutional order flow and retail noise.
-----------------------------------------------------------------------------------
EMA Length \ 36 \ approximately one full trading session. This captures the dominant intraday trend without excessive lag.
-----------------------------------------------------------------------------------
Channel Width Mode \ Percentage \ Gold's price levels change over time. Percentage mode ensures the channel scales with price, maintaining consistent relative width regardless of Gold's price level.
-----------------------------------------------------------------------------------
Channel Width \ 0.35% \ Gold's daily range averages $30–$100. At current prices, 0.35% = approximately $113–$16. This width captures ~70% of Gold's daily volatility, creating a meaningful "value zone" that filters noise while remaining relevant.
-----------------------------------------------------------------------------------
Lower Timeframe \ 5m \ Fast enough to capture entry signals within the same session, slow enough to filter out micro‑noise. 5m is Gold's "sweet spot" for intraday entries.
-----------------------------------------------------------------------------------
Engulfing Mode \ Percentage \ Adapts to Gold's volatility. As Gold's price moves, the required engulfing range scales proportionally—ensuring consistent pattern quality.
-----------------------------------------------------------------------------------
Engulfing Min Range \ 0.098% \ At Gold's current price3000-5000, this ≈ $3.0–$5.0. Anything smaller is just market noise, not a meaningful reversal signal.
-----------------------------------------------------------------------------------
Engulfing Max Range \ 0.550% \ At Gold's current price, this ≈ $20–$25. Larger candles are often blow‑off spikes driven by news —they tend to reverse violently, making them poor entry points.
-----------------------------------------------------------------------------------
Previous Range % \ 0.60 \ Allows the prior candle to be up to 60% of the engulfing candle's range. This is Gold's "consolidation before reversal" pattern—a small same‑color candle before a large reversal candle.
-----------------------------------------------------------------------------------
Gap Allowance \ 250 ticks \ Gold's typical spread and gap behavior. (250 ticks = $0.250 However, tick values vary between brokers), which accommodates normal gaps without allowing extreme invalid gaps.
-----------------------------------------------------------------------------------
Pin Bar Sweep \ 10 bars \ On a 5m chart, 10 bars = 50 minutes. Gold's liquidity grabs often occur within a 30–60 minute window. 10 bars captures these recent liquidity zones without looking too far back.
-----------------------------------------------------------------------------------
Pin Bar Range % \ 0.70 \ Requires the pin bar(high-low) to be at least 70% of the minimum engulfing range. This ensures the pin bar has enough size to be meaningful—rejecting tiny pin bars that lack conviction.
-----------------------------------------------------------------------------------
Risk per Trade (1st) \ 2% \ Gold experiences 3–5 trade losing streaks regularly. 2% risk ensures that a typical losing streak results in only 6–10% drawdown—recoverable with a few winning trades.
-----------------------------------------------------------------------------------
Risk per Trade (2nd) \ 1% \ When pyramiding, total exposure increases. 1% on the second trade limits worst‑case loss to -3% total (2% + 1%), protecting the account during false reversals.
-----------------------------------------------------------------------------------
Risk:Reward \ 1:3 \ Gold routinely moves 1.5–2× its ATR in a single directional push. A 1:3 target (e.g., $15 on a $5 stop) is well within Gold's typical daily range—achievable without being overly ambitious.
-----------------------------------------------------------------------------------
Stop‑Loss Reference \ Channel \ Aligns the stop with the value area. If price breaks beyond the channel, the mean‑reversion thesis is invalidated. This is the most logical stop placement for this strategy.
-----------------------------------------------------------------------------------
Stop‑Loss Buffer \ 500 ticks \ 500 ticks = ($0.50 ) on Gold. However, tick values vary between brokers so The table on chart will display and show the calculated dollar value. This provides a safety buffer against spread, slippage, and normal wicks—preventing premature stops while keeping the stop within the value area.
-----------------------------------------------------------------------------------
Partial TP & Breakeven \ Disabled (50%, 1:2) \ Optional features that allow locking in partial profits and protecting positions once they move in your favor. Recommended to enable after forward testing.
-----------------------------------------------------------------------------------
No‑Trade Window \ Enabled \ 16:45–19:05 NY time captures the end‑of‑day volatility spike. Gold often experiences erratic moves during this period as institutional traders close positions.
-----------------------------------------------------------------------------------
Day End Close \ Enabled \ Gold gaps frequently at the daily open (5:00 PM NY). Closing before day end avoids these gaps, which can easily stop out tight positions.
-----------------------------------------------------------------------------------
Week End Close \ Enabled \ Gold is highly sensitive to weekend news (geopolitics, central banks). Gaps of $20–$50+ are common at Sunday open. Closing before Friday close is essential.
-----------------------------------------------------------------------------------
EMA Lower TF \ Enabled \ Ensures entries align with the 5m micro‑trend. However, the Pin+Engulf combo overrides this filter to capture institutional reversals against the trend.
-----------------------------------------------------------------------------------
Higher TF EMA \ Enabled (1H, 55) \ Provides an additional layer of trend confirmation at the macro level. The 1H 55‑EMA acts as a reliable gauge of the broader intraday trend, preventing entries against strong momentum.
-----------------------------------------------------------------------------------
RSI \ Enabled length(14) \ Prevents buying when Gold is overbought (RSI > 70) and selling when oversold (RSI < 30). Gold's sharp spikes often create extreme RSI readings—this filter avoids chasing exhausted moves.
-----------------------------------------------------------------------------------
Bollinger Bands \ Enabled \ locks entries during low volatility (BB width < 0.002). Gold sometimes enters tight consolidation ranges (BB width < 0.002) where engulfing patterns fail. This filter avoids trading in these conditions.
-----------------------------------------------------------------------------------
Squeeze Momentum \ Enabled \ This is inverted from standard SQZMOM. Gold's momentum often overshoots before reversing. By fading the extreme (longs when val < 0, shorts when val > 0), the strategy captures the reversal rather than chasing the continuation.
-----------------------------------------------------------------------------------
# Important Notes on Backtest Realism
- Commission – Most ECN/raw-spread brokers charge $3.00–$3.50 per side (round-turn commission of $6.00- $7.00) for 1 standard lot (100 oz) of XAUUSD. Standard accounts usually build the fee into a wider spread instead of charging a separate cash. This strategy deducts $3.50 per entry and $3.50 per exit ($0.035 × 100 oz)round-turn commission of $7.00. Adjust this to match your broker's exact fees.
- 4 ticks Slippage – For XAUUSD on OANDA, 1 tick = $0.001** per ounce (3 decimal places). 4 ticks = **$0.004 per ounce. Adjust this value if your broker quotes XAUUSD with different decimal precision (e.g., 2 decimal = $0.01 per tick).
Always adjust the commission value to your broker's exact fee structure before relying on the results.
"A backtest without realistic commission and slippage is a fantasy. A backtest with realistic commission and slippage is a truthful reflection of what you can expect when trading live."
-------------------------------------------------------------------
📊 Chart Display
Channel – Upper/Lower bands with a semi‑transparent fill (red zone), representing the value area
EMA Lower TF – Green EMA on the lower timeframe for confirmation
HTF EMA Filter – Red EMA line showing the additional trend filter (plotted on all timeframes ≤ its TF)
Info Table – Shows Market Status, EMA confirmations, Channel Width, Engulfing ranges, SL settings,
Filters, No‑Trade Window status, Session Close status
Signal Arrows – Green arrow pointing up (below bar) for Long entries, Red arrow pointing down (above bar) for Short entries
Historical Trades – Configurable number of past trades to display on the chart (default: 111, max: 125). Adjust this to optimize chart performance while keeping sufficient trade history for visual analysis.
Reset Signal – Arrow marker (grey) indicating when the trade counter resets at session starts (Asia, London, New York for TF ≤ 15m, or daily for larger TFs)
Background Colors – red for No‑Trade Window, Gray/White for Session Close
UI Note
# When you adjust any setting in the Inputs tab (Channel Width, Engulfing Min/Max, Previous Range, SL Buffer, etc.), the values displayed in the info table update automatically in real‑time.
This allows you to:
- See the impact of your changes immediately
- Verify the actual dollar values of your settings at current price levels
- Fine‑tune parameters without switching between tabs
Example: If you change the Channel Width from 0.35% to 0.50%, the info table will instantly show the new width in dollars (e.g., $8.50 → $12.00).
# Inputs are hidden from the status line to keep the chart clean. All settings (zones, EMAs, risk, patterns) remain fully adjustable in Settings → Inputs tab.
-------------------------------------------------------------------
📌 In Summary:
This is not a random collection of indicators.
- The HTF EMA Channel provides the structural context – a dynamic value area that adapts to volatility.
- The Engulfing/Pin Bar patterns provide the high‑conviction trigger – exhaustion confirmation.
- The EMA Override provides the institutional edge – capturing liquidity grabs that standard EMA‑based strategies miss.
- The Optional Filters provide the quality control – reducing false signals.
- The Risk Management provides the survivability – realistic position sizing and stops.
Each component exists specifically to compensate for a flaw in the others. This interdependency is what makes the strategy original, robust,
Author: Awab_Hassan
Estratégia

Support and Resistance Zones, Key Levels & Hold Rate [LunqFX]Support and resistance indicators all draw the same picture: a set of key levels and SR zones detected from swing pivots, every one of them looking as important as the next. Five price levels on the chart and no way to tell which one the market actually respects — so you place the order at whichever support or resistance price bounced off last, and call it analysis.
This support and resistance indicator keeps score. Each auto-detected SR zone carries the number of times it has been tested and how many of those tests it held, printed on the level itself:
1.15370 · 71% · 5 of 7 1.14344 · 50% · 1 of 2 1.13763 · 67% · 2 of 3
A key level that has held five of seven tests and one that has held one of six are not the same object, and until that number is on the chart you are trading them as if they were.
Included: automatic support and resistance zone detection from confirmed pivots, a hold-rate record on every level, strength-weighted drawing, a dashboard showing the nearest support and resistance either side of price, and optional buy and sell signals with a trend filter and alerts.
❶ HOW THE SUPPORT AND RESISTANCE ZONES ARE BUILT
Swing points come from confirmed pivots, so a level only exists once the bars on both sides of it have closed — nothing appears and then vanishes. Pivots that land close to each other are merged into a single zone rather than stacked as near-duplicate lines, with the merge distance measured in ATR so it adapts to the instrument.
A zone widens as new pivots join it, but only up to a ceiling. Past that it re-centres on the pivot that just touched it. Without that rule a level slowly swallows everything around it and turns into a band, and the count then measures touches of a band instead of touches of a price.
❷ THE HOLD RATE — what no other support and resistance tool shows
A test opens when price trades into the zone. It resolves on a CLOSED bar, one of two ways:
▸ HELD — price closed back out the side it came from, clear of the zone by a fraction of ATR. The margin matters: without it, a close one tick beyond the edge counts as a rejection, which is how level indicators manufacture events out of noise. ▸ BROKEN — price closed through to the other side.
Nothing is counted while a test is still open. And a fresh test cannot begin until the previous one has had room to breathe, because price chopping inside a zone for a week is one consolidation, not twenty separate tests of the level.
Samples of fewer than four tests are marked with a tilde. Two tests producing "100%" is noise, and the chart says so rather than letting the number stand.
❸ LEVEL STRENGTH YOU CAN SEE
Fill density, border thickness and the halo behind each zone all scale with how often the level has been tested, and levels holding above 60% are drawn in a brighter shade. The chart ranks its own levels — the strongest one is the one that looks strongest, with no arithmetic required from you.
❹ THE DASHBOARD — nearest support and resistance
The nearest level above and the nearest level below, each with its price and its record. When there is no tracked level on one side the panel says exactly that, rather than printing a dash that reads like a fault.
❺ BUY AND SELL SIGNALS — built in, switched off
The indicator includes buy and sell signals: a buy label when a support test holds, a sell label when resistance holds. Turn them on in the Signals section — the switch is the first setting in the group, and every alert works from them.
They ship switched OFF, and the reason is worth stating plainly. A rejection at a support or resistance level is a fact. What price does afterwards is not. A level also tends to weaken with each test as the orders behind it are consumed, so "this level held four times" is not evidence that it will hold a fifth — if anything the reverse. Any indicator that hands you an arrow on every bounce is selling you that assumption without saying so.
When switched on, a signal has to clear six filters before it prints: the level must have been tested enough times to have a record, it must hold more often than it breaks, the rejection must close clear of the zone by a fraction of ATR, price must still be near the level, the trend must agree with the direction, and both the chart as a whole and that particular level must have been quiet since the last one. Set that way they are rare. Treat them as a prompt to look, not as a call to act.
HOW TO USE IT
1 — Choose where to place a resting order. Between two levels the same distance away, the one with the better record is the better limit.
2 — Choose where to expect a break. A level holding one test in six is telling you something too: price is likely to go through it, which makes it a poor place to fade and a reasonable place to trade a breakout.
3 — Place stops behind proven levels. A stop tucked behind a level that has held five of seven has a structural reason to be there.
4 — Read the whole set at once. This is the reading most traders never get. If every level on the chart is showing 30–40%, the market is not respecting levels at all right now — it is trending or reacting to news, and level trading is the wrong approach for the session. When most levels sit at 70%+, the market is rotating and levels are worth trading. That judgement usually takes weeks of screen time; here it is on the chart.
HOW IT WORKS
Pivots of your chosen length define candidate levels. Each new pivot either joins the nearest existing zone within the merge distance or opens a new one; zones are capped in width and the oldest is dropped once the limit is reached. Every zone tracks four numbers: tests, holds, the bar its last test resolved on, and the bar it last signalled on. Tests resolve on closed bars only, with a rejection margin in ATR and a minimum gap between tests. The hold rate is simply holds divided by tests, and the drawing weight is derived from the test count.
Works on any symbol and timeframe. On daily charts and above, leave the minimum test count at one — a level there rarely gets a second test before it matters. On fast intraday charts raise it, since levels are tested often.
SETTINGS
▸ Levels — pivot length, how many levels are kept, how far back they draw, merge distance, zone thickness, maximum width, minimum tests to draw, and the gap between tests. ▸ Signals — off by default; prior holds required, minimum tests before a level may speak, minimum hold rate, cooldowns, distance from price and rejection strength. ▸ Trend Filter — direction requires both price position and the slope of the average, so a range satisfies neither side. ▸ Visuals — extension, labels, candle colouring, dashboard position.
ALERTS — buy signal, sell signal, and any signal. All fire on closed bars only.
NON-REPAINTING — levels are built from confirmed pivots and every test resolves on a closed bar. A record that has printed never changes retroactively, and a level that has appeared never disappears from history.
WHY THESE PARTS ARE ONE SCRIPT
The levels, the record and the visual weight describe one object. Detection alone gives you lines with no way to rank them. The record alone has nothing to attach itself to. The weighting exists only so the record can be read at a glance instead of counted. Take any one away and the other two stop being useful, which is why they ship together rather than as three indicators.
This indicator is an educational market-analysis tool, not financial advice. The hold rate describes what has already happened at a level on the loaded chart; it does not predict what will happen next. Always confirm with your own analysis and manage your risk. Indicador

Zone Flow S/R StrategyZone Flow S/R Strategy
📌 Strategy Overview
Zone Flow is a multi‑timeframe support/resistance strategy that uses dynamic pivot‑derived zones to identify high‑probability reversal and breakout setups.
Unlike static support/resistance lines, this 9‑level zone system (R4–R1, P, S1–S4) automatically adapts to market structure changes at each new period (Daily/Weekly/Monthly). Each zone has a configurable width (Percentage, ATR, or Fixed) to account for volatility, and a breakout threshold to filter out minor wicks.
# Unique Synergy
Most pivot strategies treat levels as static lines, leading to false breakouts. Most engulfing strategies ignore the bigger picture, catching falling knives. This strategy solves both problems by combining these components in a specific sequence:
1- Dynamic Zones + Gap State Machine (The Context)
Instead of just drawing lines, we create zones (R1-R4, P, S1-S4) with adaptive width. More importantly, the Gap State Machine tracks which gap price sits in (e.g., between R1 and Pivot). This tells us exactly where we are in the market structure. If price moves from upper Gap to lower Gap, the strategy instantly switches sentiment from Bullish to Bearish.
- Why this matters: It prevents the strategy from trading blindly; it only trades when price is transitioning between structural levels, and price retrace to the zone drastically reducing false signals in the middle of nowhere.
2- Pin Bar Sweep + Engulfing Combo (The Momentum Trigger)
A standard pin bar alone is a weak reversal signal. A standard engulfing pattern alone is common. However, when a Pin Bar sweeps the N-bar high/low (proving a breakout attempt failed) and is immediately followed by an Engulfing pattern on the next candle, this combo represents a "double confirmation" of exhaustion.
Crucially, this specific combo overrides the EMA confirmation.
- Why this matters: Strong momentum sweeps often happen against the short-term EMA trend. By allowing this specific combo to bypass the EMA, the strategy captures powerful reversals that pure trend-following strategies miss.
3- Dynamic Zone Width (The Volatility Adaptation)
Instead of using fixed support/resistance, the zone width changes based on the selected Period's ATR or Percentage.
- Why this matters: This ensures the strategy scales perfectly across any asset (Gold, Crypto, Forex) without manual width adjustments, making it robust across different volatility regimes.
4- Selective Zone Activation (The Manual Override)
Unlike standard pivot systems that force trades on every level, the Zone Selection inputs allow users to disable specific zones (e.g., turn off R3 if price often fakes out there or turn off S4 market is always get exhausted lower probability trade).
- Why this matters: This turns the strategy from a rigid algorithm into a customizable framework where the user can apply their own discretion based on historical price behavior.
5. Hierarchical EMA Architecture (The Structural Governor)
This strategy does not treat all EMAs equally. It uses a two-tier EMA system with a strict hierarchy:
Lower TF EMA (Optional & Overrideable): The Lower TF EMA on the current timeframe acts as a micro-trend filter. However, as explained above, the Pin Bar Sweep + Engulfing Combo can override this filter. Why? Because strong institutional reversals often happen against the short-term trend, and we want to capture them.
Higher TF EMA (Absolute & Non-Negotiable): Higher TF EMA on the selected Higher Timeframe acts as an "Absolute Structural Governor." Unlike the lower EMA, this filter cannot be overridden by any pattern.
For Long entries: Price must be above this HTF EMA.
For Short entries: Price must be below this HTF EMA.
Most strategies either ignore the HTF entirely. By making the HTF EMA absolute and the LTF EMA overrideable, this strategy achieves the perfect balance:
The HTF EMA prevents catastrophic drawdowns by keeping you on the right side of the bigger trend.
The LTF EMA override allows you to catch sharp, high-probability reversals within that trend without being delayed by a slow-moving micro-filter.
6. Optional Risk Architecture (The Management Layer)
The strategy includes a built-in partial-take-profit and breakeven module. By default, this module is disabled to provide a clean, straightforward 1:3 risk-reward backtest without the complexity of multiple exit orders.
This default setting allows users to evaluate the core entry logic (zones + patterns) without interference from partial exits.
However, for traders who want to reduce psychological pressure or manage Gold's notorious retracements, they can enable Allow Breakeven and Allow Partial TP. When activated, the strategy closes a percentage of the position (e.g., 50%) at a lower R:R threshold (TP1) and moves the remaining position to breakeven—locking in early profits while letting the rest of the trade run.
# Zone Calculation
The strategy calculates 9 zones using a modified pivot point formula from the selected period (Daily, Weekly, Monthly, Quarterly, Yearly):
The pivot formula can be one of 5 methods: Classic, Fibonacci, Woodie, Camarilla, or DM.
The Classic Pivot (shown below) is the most widely used and serves as the default:
Pivot (P) = (H + L + C) / 3
R1 = (2 × P) – L
S1 = (2 × P) – H
R2 = P + (H – L)
S2 = P – (H – L)
(R3, R4, S3, S4 are logical extensions of this same principle)
Additional Methods (Briefly Explained):
Fibonacci: Uses the golden ratio multipliers (0.382, 0.618, 1.000, 1.618) to place support/resistance levels between the pivot and the high/low range.
Woodie: Gives extra weight to the closing price (Formula: P = (H + L + 2C) / 4), making it more sensitive to the current session's momentum.
Camarilla: Uses multipliers based on the previous range to place levels very close to the current price, ideal for range-bound trading and scalping.
DM: Adjusts the pivot formula conditionally based on whether the close was higher or lower than the open, making it adaptive to daily sentiment.
From these, the strategy derives:
- 4 Resistance Zones (R4, R3, R2, R1) – above the pivot
- 1 Pivot Zone (P)
- 4 Support Zones (S1, S2, S3, S4) – below the pivot
Each zone is expanded by a Zone Width to create a buffer, making the levels more practical.
# Zone Width Calculation
Three modes:
- Percentage – zone width as a percentage of current price
- ATR Multiplier – width = ATR × Multiplier
- Fixed – fixed price distance
# Gap Index Mapping (0–9):
Gap 0 – Above R4 → Aggressive (no trades)
Gap 1 – Between R4 and R3 → Bearish near R4, Bullish near R3
Gap 2 – Between R3 and R2 → Bearish near R3, Bullish near R2
Gap 3 – Between R2 and R1 → Bearish near R2, Bullish near R1
Gap 4 – Between R1 and Pivot → Bearish near R1, Bullish near Pivot
Gap 5 – Between Pivot and S1 → Bearish near Pivot, Bullish near S1
Gap 6 – Between S1 and S2 → Bearish near S1, Bullish near S2
Gap 7 – Between S2 and S3 → Bearish near S2, Bullish near S3
Gap 8 – Between S3 and S4 → Bearish near S3, Bullish near S4
Gap 9 – Below S4 → Aggressive (no trades)
Based on the gap index and price action, the strategy sets allowLong or allowShort – and displays the status on the info table.
Market Status Displayed:
- Bullish – near support zones; long trades allowed
- Bearish – near resistance zones; short trades allowed
- Waiting – new period started; zones recalculating; no trades
- Aggressive – above R4 or below S4; no trades
- Zone disabled – manually disabled zone; no trades
# Entry Signals
1. Engulfing Patterns
Detects bullish and bearish engulfing with filters:
- Body Only – if true, only bodies must engulf (not full range)
- Min/Max Range – can be Percentage, ATR Multiplier, or Fixed
- Gap Allowance – max price gap between previous close and current open
- Previous or Prior Candle – at least one of the last two candles must be the opposite. color (bearish for bullish engulf; bullish for bearish engulf).
This is not a random condition. The strategy only considers trades when price is near a strong structural zone (support/resistance). Because the zone itself provides the primary context for a potential reversal, the immediate previous candle does not need to be strictly opposite in color.By relaxing the requirement to "at least one of the last two," the strategy captures valid reversals at key levels that a strict, textbook rule would miss—while remaining highly selective because it only trades near strong zones.
2. Pin Bar + Engulfing Combo (EMA Override)
Identifies hammers/shooting stars with:
- Wick/Body Ratio (Wick 3× body)Requires a clearly defined pin bar with a very small body.
- Max Body/Range (Body is at most 20% of range) Ensures the body is genuinely small relative to the total range. This is the textbook definition of a pin bar/hammer. Captures true rejection candles.
- Min Wick/Range (70% of range) This is the classic pin bar definition. A 70%+ wick means price aggressively rejected the level and reversed.
- Sweep Lookback – bullish pinbar must break the lowest low of the previous N bars;
bearish must break the highest high
a pin bar that sweeps a recent extreme (lookback) and the very next candle forms an engulfing pattern in the same direction. This combo overrides the Lower TF EMA confirmation – a unique feature that captures strong momentum after a sweep.
Combined Entry Requirements
All of the following must be true:
1. Valid engulfing or pin+engulf combo
2. Pattern occurs near a zone (open inside zone boundaries or crossing it)
3. Market status aligns with trade direction
4. Daily trade limit not exceeded (default: 2)
5. Relevant zone is enabled
6. Price is on the correct side of EMAs (unless overridden by combo)
7. HTF EMA confirms (if enabled)
8. RSI not overbought/oversold (if enabled)
9. Not within the no‑trade window (if enabled)
-----------------------------------------------------
# Confirmation Filters
Current TF EMA – ensures micro‑trend alignment. Overridden by pin+engulf combo.
Higher TF EMA (default 150 on 1H) – filters out counter‑trend moves in the bigger picture.
RSI – prevents buying above 70 and selling below 30.
Bollinger Bands – blocks trades when volatility is too low (BB width below threshold).This filter is specifically designed for assets that range heavily—choppy, sideways markets.
No‑Trade Window – avoids end‑of‑day volatility (active only for timeframes ≤15min).
# Risk & Position Management
1- Position Sizing:
- Risk per trade – percentage of equity for first trade, separate for second
- Position size = (Account Risk) / (Entry – SL distance).
- Second trade does not increment the daily trade counter:
This is a deliberate design choice. The daily trade counter tracks new trade initiations, not total positions. The second trade (pyramiding) is considered a continuation of the existing position, not a new independent decision. This ensures the strategy can scale into strong trends without consuming the daily limit, while still respecting the maximum number of new entries per session.
2-Stop Loss Options:
- Low-High – entry bar low/high ± buffer Tight, reactive stops. Best for scalping or when you want the SL to follow the immediate price action of the entry candle.
- Swing high/low – N-bar low/high ± buffer Broader, structural stops. Ideal for swing trading or when you want the SL to respect recent market structure rather than a single bar.
- Zone – zone boundary ± buffer Structural stops aligned with pivot levels. Best when you want the SL to be placed exactly at the structural support/resistance level that defines the trade.
- Fixed distance – fixed price distance Simple, static stops. Useful when you know your exact risk tolerance in dollar/pip terms and want a consistent SL distance regardless of volatility.
- ATR Multiplier – entry ± (ATR × multiplier) Volatility-adaptive stops. Best for Gold's changing volatility—widens during news/high volatility, tightens during calm periods.
3- Take Profit:
- Main R:R ratio – main R:R ratio (default 1:3), plus optional partial TP and breakeven at a lower R:R ratio.
- Partial TP – close a percentage of position at a lower R:R (TP1)
- Breakeven – optionally move stop to entry at TP1
4- Trade Counter Reset:
- For TF ≤ 15m: resets at NY (9:30 AM) and London (3:30 AM) starts (configurable)
This aligns with Gold's session-specific volatility and allows fresh participation in each session while preventing over-trading within a single session.
- For TF > 15m: resets once per day at session start (Every new day) Session-specific behavior is less relevant on higher timeframes, and a simple daily cap is more appropriate for swing trading.
5- No‑Trade Window:
- Avoids high‑volatility periods (e.g., end of day)
- Active only for TF ≤ 15m (16:00 PM – 18:30 PM NY time, configurable) End-of-day volatility spikes can cause excessive slippage and erratic price action on short timeframes. on TF > 15 The window is too short to be meaningful; higher timeframe traders are less affected by brief volatility spikes.
6- Session Close:
- TF ≤ 15m: can close at day end and/or week end (configurable). Scalping trades on 1m–15m charts typically last minutes to a few hours. These trades are highly sensitive to Overnight gaps, Weekend gaps
- 15m < TF ≤ 10h: only week end. Swing trading on 30m–4H charts typically lasts hours to several days.
- TF > 10h: feature disabled. Position trading on daily+ charts lasts days to weeks. These trades aim to capture large macro moves.
# Chart Display
- Zone boxes – semi‑transparent red/pink with labels (R4…S4), auto‑cleanup (max 55 periods)
- Trade management lines – entry (white), SL (red), TP (green), TP1/breakeven (dashed),
with green/red fills; auto‑cleanup ((4) * max 125)
- Info table (top‑right) :
1. shows Market Status(Bullish/Bearish/Aggressive/Waiting).
2. EMA confirmations.
3. Zone Width, Breakout threshold.
4. Engulf range max min.
5. SL settings(SL refrence, sL bufer)
- EMA plots – light blue (lower TF) and light red (higher TF)
- Signal shapes – hidden by default (can be enabled via style settings)
- arrowdown shapes - "Reset trade counter"
- Background 1 color – yellow during no‑trade window
- Background 2 color – white close all position on week/day end.
UI Note: Inputs are hidden from the status line to keep your chart clean. All settings (zones, EMAs, risk, patterns) remain fully adjustable in Settings → Inputs.
# Default Settings – Optimized for XAUUSD (Gold)
All default values have been calibrated specifically for Gold's typical volatility and intraday structure.
(Setting : Default : Why This Works for Gold)
----------------------------------------------------------------------------------------
Period : Daily : Gold respects daily highs/lows as key structural levels.
-----------------------------------------------------------------------------------------
Pivot Type : Classic : Most widely used and reliable for Gold.
-----------------------------------------------------------------------------------------
Zone Width : ATR (0.053× ATR(14)) : ATR(14) provides a stable, week-to-week view of Gold's volatility (roughly two trading weeks of data).Adapts to Gold's daily volatility (Zone Width often $4–$10 range).
-----------------------------------------------------------------------------------------
Breakout Threshold : 7% of zone width : Zone width ≈ $3.00–$10.00 (Daily ATR × 0.053). 7% ≈ $0.21–$0.70 (21–70 ticks)—filters noise wicks, captures genuine breaks.Prevents false transitions caused by standard stop-hunting wicks
-----------------------------------------------------------------------------------------
Engulfing Range : ATR(14) (0.375× – 2.5×) : ATR(14) sits in the "sweet spot"—responsive enough to capture shifts in Gold's volatility relatively quickly, yet long enough to smooth out the daily noise and provide a reliable, consistent measure. Captures meaningful moves $3–$15—ensures candle has enough size to be meaningful, rejecting tiny $0.30–$0.50 noise patterns, while filtering out massive blow-off spikes (> $20–$25 on 15m).
-----------------------------------------------------------------------------------------
Pin Bar Sweep : 12 bars : 12 bars – Calibrated for Gold's 3-hour intraday cycle and session transitions. Long enough to capture genuine liquidity grabs, short enough to avoid outdated levels.
-----------------------------------------------------------------------------------------
Risk per trade : 2% (1st), 1% (2nd) : Balances risk with Gold's occasional false breakouts. For Gold's volatile nature, 2%-1% provides the best balance between survival and growth.
-----------------------------------------------------------------------------------------
Risk:Reward : 1:3 : Gold routinely moves 1.5–2× its ATR in a single directional push. A 1:3 target is well within Gold's typical daily range.
-----------------------------------------------------------------------------------------
Stop-Loss Reference : ATR Multiplier : For Gold's volatile nature, a static stop-loss (Fixed or Low-High) cannot adapt to changing volatility. ATR-based SL scales with market conditions—widening during high volatility (news, session opens) and tightening during calm periods. This ensures the stop-loss is always "fair" relative to current market conditions, preventing premature stops during normal volatility spikes
-----------------------------------------------------------------------------------------
Stop-Loss Multiplier : 1.8× ATR(14) : A 1.8× ATR(14) stop-loss represents 1.8 times Gold's average 14-period range. Why 1.8× and not 2.0× or 1.5×? Backtesting revealed that 1.8× is the "sweet spot"—wide enough to survive Gold's normal volatility spikes without being stopped out by noise, yet tight enough to limit losses
-----------------------------------------------------------------------------------------
Current TF EMA : 21 (Enabled, Overrideable) : On 15m chart = 5.25 hours—perfectly captures Gold's average intraday move length. Can be overridden by Pin Bar + Engulfing Combo to catch institutional reversals that occur against the short-term trend.
-----------------------------------------------------------------------------------------
Higher TF EMA : 150 on 1H : On Gold, a 150-period EMA on a 1H chart represents roughly 6.5 days (one full trading week) of data. By making this filter absolute, the strategy guarantees it will never take a counter-trend trade against the weekly macro-structure.trend.
-----------------------------------------------------------------------------------------
Filter (RSI) : length 12 : Most traders default to RSI(14), but RSI(12) is intentionally faster for Gold's volatile intraday moves. Gold often spikes into overbought/oversold territory and reverses quickly. A 12-period RSI reacts ~15% faster than RSI(14), catching these reversals earlier while remaining smooth enough to avoid excessive whipsaws.
-----------------------------------------------------------------------------------------
Filter (Bollinger Bands) : Disabled by default : Gold is historically a trending asset with strong directional moves. A low-volatility filter would unnecessarily block valid entries during these trends. Designed for range-bound assets (choppy crypto, certain forex crosses)—enable it only if your market consolidates heavily.
-----------------------------------------------------------------------------------------
These values are a starting point – you may adjust them for other assets or personal risk tolerance.
# Important Notes on Backtest Realism
- Commission – Most ECN/raw-spread brokers charge $3.00–$3.50 per side (round-turn commission of $6.00- $7.00) for 1 standard lot (100 oz) of XAUUSD. Standard accounts usually build the fee into a wider spread instead of charging a separate cash. This strategy deducts $3.50 per entry and $3.50 per exit ($0.035 × 100 oz)round-turn commission of $7.00. Adjust this to match your broker's exact fees.
- 4 ticks Slippage - For XAUUSD, 1 tick = $0.01 per ounce. 4 ticks = **$0.04 per ounce (unit)**. Accounts for real-world price . Prevents overly optimistic backtest equity curves.
Always adjust the commission value to your broker's exact fee structure before relying on the results.
"A backtest without realistic commission and slippage is a fantasy. A backtest with realistic commission and slippage is a truthful reflection of what you can expect when trading live."
- Intra-Bar Execution: The strategy uses calc_on_every_tick = true, meaning it recalculates on every price tick during real-time trading. This allows the breakeven and partial TP logic to trigger immediately when price hits TP1, protecting the trade from intra-bar reversals.
Note: Backtests use OHLC data only, so intra-bar fills and breakeven triggers cannot be perfectly simulated. Real-time performance may differ from backtest results due to this limitation
# The Core Innovation (Why This Isn't Just a Mashup)
This strategy is built on a three-layer validation system. Each layer solves a specific problem that the other layers cannot solve alone.
Layer 1 (The Structure): Dynamic Pivot Zones
Layer 2 (The Trigger): Pin-Bar Sweep + Engulfing Combo
Layer 3 (The Execution): Gap State Machine
Here is how they interdepend to create a unique edge:
1. Adaptive Pivot Mathematics (The "Regime Matching" Logic)
Instead of offering multiple pivot types just for the sake of it, this strategy provides them so the trader can match the mathematical formula to the market's current behavioral regime:
Why this matters: Most strategies lock you into one formula. This strategy acknowledges that price dynamics change, and it gives you the mathematical weapon to adapt without rewriting the entire code.
2. The "Liquidity Grab" Trigger (Sweep + Engulfing Combo)
This is the most critical edge of the strategy. A standard Engulfing pattern is common. A standard Pin Bar is common. But when they occur sequentially—a Pin Bar that sweeps the 12-bar extreme, immediately followed by an Engulfing candle—it represents a textbook institutional "liquidity grab."
- The Logic: Large players often push price to sweep obvious stop-losses (above highs or below lows) before reversing the trend.
- The Override: Crucially, this specific combo overrides the Lower TF EMA confirmation.
- Why this is a breakthrough: Standard trend-following strategies with a hard EMA filter will miss these reversals because price is moving against the EMA in the short term. By programming this specific override, the strategy captures the exact moment of institutional reversal—catching the move before the EMA flips and the trend-followers finally enter.
3. The Gap State Machine (Dynamic Sentiment Tracking)
Unlike static support/resistance scripts that just plot lines and wait for touches, this strategy features a state machine that tracks which of the 9 gaps (between R4-R1, Pivot, S1-S4) the price currently occupies.
- The Mechanism: A Breakout Threshold (default 7% of zone width) acts as a "dead-zone" filter. Price must exceed this threshold to officially transition from one gap to another.
- The Alpha: This prevents the strategy from whipsawing during minor noise. When price crosses from Gap 4 (between R1 and Pivot) into Gap 3 (between R2 and R1), the strategy instantly and autonomously switches market status from "Bearish" to "Bullish" or vice versa.
4. Selective Zone Activation (Strategic Discretion)
- This strategy allows the user to completely disable specific zones (e.g., turn off R3).
- The Value: By disabling a weak level, the user forces the strategy to wait for the next stronger level, instantly increasing the win rate and filtering out historically weak signals without altering any other code.
5. Non-Invasive Risk Architecture (Clean Defaults)
For traders who want to reduce psychological pressure or optimize for Gold's notorious retracements, they can enable these modules. When activated, the strategy closes % of the position at a lower R:R threshold and moves the remaining position to breakeven—locking in profits while letting the rest run.
In Summary: The "Mashup" Justification
This is not a random collection of indicators.
1. The State Machine provides the structural context.
2. The Pin+Engulf combo provides the high-conviction trigger that overrides slow-moving filters.
3. The Selectable Pivot Types provide the mathematical adaptability to different assets.
4. The Selectable Zones provide the manual discretion to avoid historical losing levels.
5. The Disabled TP/BE by default provides a clean baseline for evaluating the core logic.
Author: Awab_Hassan
Estratégia

TL Space Concept Pro - Three Finger Spread Breakout EngineSPACE CONCEPT PRO - THE THREE-FINGER SPREAD ENGINE
Some of the most consistent discretionary traders never look at a chart without two moving averages on it: the 20 SMA and the 200 SMA. Add price itself and you have THREE ITEMS - three "fingers". The distance between them is called SPACE, and space tells you when a market is about to explode and when a move is about to die. This indicator turns that entire concept into a fully mechanical engine with signals, trade management and webhook automation.
=== THE CONCEPT ===
THE THREE ITEMS
1. Price
2. The 20 period simple moving average
3. The 200 period simple moving average
NARROW STATE - all three items clustered together. The market has reset itself. An explosive move is loading, direction unknown. You do not need to predict it: you simply wait for the biggest bar to emerge.
SPACE ZONE 1 - the space between the 20 SMA and the 200 SMA.
SPACE ZONE 2 - price accelerating away from the 20 SMA. Sometimes the underlying moves faster than the moving average can keep up, creating a second layer of space.
DUAL SPACE / THREE-FINGER SPREAD - both zones open at the same time, all three fingers clearly separated and stacked in order. This is where moves get exhausted.
THE RAILROAD RULE - if price runs parallel to the 20 SMA like railroad tracks, that is NOT a spread. Price has to ACCELERATE away from the moving average. The engine checks this automatically.
THE WIDEST SPREAD - the widest three-finger spread of the lookback window finds you the temporary top or bottom 8 to 9 times out of 10. When it prints, the reversal watch arms and the extreme that must hold is marked on the chart.
NARROW TO NARROW - when the spread collapses from the widest state back to narrow WITHOUT breaking the extreme, the next direction is the reversal. Confirmed by a power bar: a three-finger spread reversing with a power bar is the creme de la creme of this method.
=== THE SIGNALS ===
1. BREAKOUT - power bar (biggest bar of the window) exploding out of a narrow state. Entry inside the bar, stop beyond the bar.
2. SPREAD REVERSAL - widest spread found the extreme, spread collapsed back toward narrow without breaking it, power bar confirms. Target follows the 50 percent rule.
3. EARLY REVERSAL - first strong color change directly at the widest spread (the bottoming tail bar play). Stop beyond the extreme.
4. TAIL BAR - optional: bottoming/topping tail bars near narrow states as early entries (markers by default).
Every signal prints as a two-line pill with the setup name, and every pill carries a WHY tooltip that explains the exact chain of logic behind the trade - plus entry, stop, target and R:R.
=== TRADE MANAGEMENT (AS TAUGHT) ===
- ADD on the first color change after entry ("always adding on the first color change")
- TP at the 50 percent mark of the move - the pros are satisfied with the halfway mark, do not get greedy
- After the partial: bar-by-bar trailing stop until the market takes you out
- Hard stop beyond the power bar / spread extreme with an ATR buffer
- Full position box and live status in the cockpit panel
=== THE COCKPIT ===
An animated terminal-style panel shows everything at a glance:
- Animated 3D gold pixel logo with a moving light sweep (live ticks)
- State chip: NARROW STATE / 3-FINGER SPREAD / WIDEST SPREAD / REVERSAL WATCH
- Spread rank 0-100 plus live ZONE 1 / ZONE 2 meter bars in ATR
- 7-step SPACE CHECKLIST mirroring the method: items stacked, zone 1, zone 2, acceleration (railroad filter), widest-spread watch, power bar, management
- Position box, big signal line, spread/reset/signal counters
On the chart: shaded zone 1 and zone 2 fills, narrow-state boxes, MARKET RESET tags, 3-FINGER SPREAD labels, gold WIDEST SPREAD stars with vertical measuring lines (exactly how it is drawn when taught), the must-hold extreme line, TAIL tags and lightning power-bar markers. Everything is explained on the chart - hover any label for the reasoning.
=== AUTOMATION / WEBHOOK ===
Create ONE alert with condition "Any alert() function call" and paste your webhook URL. The indicator sends ready-to-use JSON for every event:
{"id":"TL-SPACE-CONCEPT","symbol":"BTCUSD","action":"BUY","setup":"BREAKOUT","price":64100.5,"sl":63900.0,"tp":64500.0,"tf":"15","time":"2026-07-18 16:30"}
Actions: BUY, SELL, ADD, TP_50, TRAIL_EXIT, SL_HIT, NARROW_STATE, WIDEST_SPREAD. Classic alertconditions for BUY / SELL / Narrow State / Widest Spread are included as well.
=== SELF-CALIBRATING ===
The spread is ranked against its own history (percentile engine) and all distances are measured in ATR - so the indicator works out of the box on any market (crypto, forex, gold, indices, stocks, futures) and any timeframe from 1 minute to weekly. Practice finding three-finger spreads everywhere - that is the homework.
=== SETTINGS ===
Every input is documented with a tooltip quoting the original rule it implements. Adjust the narrow/wide percentiles, power-bar size, dual-space minimum, acceleration window, 50 percent rule targets and the SL buffer to fit your market and style.
=== DISCLAIMER ===
Educational tool, not financial advice. No indicator wins every trade - prepare for the 1-2 times out of 10 the concept is wrong: keep your risk unit small compared to your profit unit. That is how you stay in business.
Indicador

Liquidity HeatmapLiquidity Heatmap – POC and Value Area.
A rolling volume-density profile rendered directly onto the price chart. Over a configurable lookback window the indicator distributes each historical bar's volume across every price bin its high-low range covered, then draws the resulting distribution as color-graded horizontal lines at each bin's midpoint. Point of Control and Value Area (70 % of total volume) are computed automatically, and a compact right-side histogram mirrors the profile in the future-offset zone. Built for intraday and swing traders who want a live, minimal read of where the market actually did business — the real liquidity anchors, not manual pivots.
How it works:
The indicator recalculates every N bars (default 5). On each recalc it finds the highest and lowest price of the lookback window, splits that range into a configurable number of bins (default 40), and iterates through every bar in the window. For each bar its volume — or a unit weight if volume weighting is disabled — is added to every bin whose price range the bar crossed. The result is a density array: the more time price stayed inside a bin and the higher the volume of those bars, the larger its density value. Bins are drawn as thin horizontal lines at their midpoints, with color and transparency scaled by the ratio of bin density to peak density.
The Point of Control is the bin with the largest total. Value Area is grown outward from POC, alternately taking whichever adjacent side holds more volume, until 70 % of the entire distribution is covered — VAH becomes the upper boundary of that region and VAL the lower. A right-side density histogram in the chart's offset zone re-renders the same profile in bar-chart form, and the level labels (POC / VAH / VAL) sit past the histogram so they never overlap the main heatmap. The information panel in the top-right corner shows the numeric price of each level and its signed percentage delta to the current close, color-coded green when the level sits above price, red when below, gray at parity.
What it calculates:
- Volume density per price bin over the lookback window
- POC — Point of Control, the bin with peak accumulated volume
- VAH — Value Area High, upper boundary of the 70 % volume region
- VAL — Value Area Low, lower boundary of the 70 % volume region
- Signed delta from current close to POC / VAH / VAL, in percent
Key features:
- Rolling recalculation every N bars for tunable CPU / responsiveness balance
- Volume weighting (default) or touch-count mode as a per-price frequency map — useful when volume data is unreliable
- Four-stop plasma color gradient (deep navy → violet → magenta → amber), every stop user-overridable via input.color
- Constant 1-pixel line width across all bins; visual weight is carried entirely by color intensity and transparency
- POC solid line and label placed past the offset histogram for readability
- VAH / VAL dashed lines extended all the way to their labels so the eye follows the level continuously
- Compact right-side density histogram in the future-offset area, mirroring the main profile in bar-chart form
- Top-right information panel with POC / VAH / VAL price and signed percentage delta to the current close, colored by side (green above / red below / gray at parity)
- Independent visibility toggles for POC and Value Area
- Adaptive bin geometry — resolution scales automatically with the price range of the lookback window
- Runs on any timeframe and any instrument; no external data sources required
Who it's for:
Intraday scalpers, swing traders, order-flow and Market Profile practitioners who need to see the true volume anchors of the current regime instead of hand-drawn horizontals. The color-graded strips make dominant liquidity walls, thin gaps and Value Area boundaries visually obvious at a glance, so attention goes to execution rather than to marking up the chart. Indicador

Support Resistance AI [PickMyTrade]Every support/resistance tool answers "where are the levels." None answer the question a trader actually has when price arrives at one: does THIS test look like the ones that held, or like the ones that broke?
――――――――――――――――――――――――――――――――――――――
🔷 WHAT IT MEASURES
🔸 Confirmed swing pivots, clustered into zones and merged as new evidence accumulates
🔸 Eight properties of every ARRIVAL at a zone — approach speed, relative volume, prior test count, zone age, trend pressure, zone width, pivot count, and cumulative touches
🔸 A broken level isn't discarded — it flips role once (broken support becomes candidate resistance) and only a second failure retires it
🔸 A live Previous Day/Week High/Low reference map, shown only when price is within range
――――――――――――――――――――――――――――――――――――――
🔷 THE CLASSIFIER
🔸 An online Gaussian Naive Bayes model, trained continuously as tests resolve — no repainting, no lookahead
🔸 Nothing about a level's price is used as a feature — only how price approached it
🔸 The classic claim that "a level tested repeatedly grows weaker" is measured on each chart's own history here, rather than assumed
🔸 Below a configurable warmup sample count, the script shows the chart's running hold rate instead and reads LEARNING — it never guesses early
――――――――――――――――――――――――――――――――――――――
🔷 SIGNALS AND DISPLAY
🔸 Zone boxes colored by role (support/resistance) and shaded by live conviction, with worded verdicts ("similar arrivals held X%") instead of a bare number
🔸 Rank-based visibility — only the nearest zones to current price are drawn, so old or distant levels never stretch the chart's scale
🔸 Test history ticks stamped inside each zone at the bar where its own tests resolved
🔸 An info table with Nearest Support/Resistance, model accuracy, and sample counts
🔸 3 alertconditions, worded as observations of what the classifier's reading — never as trade instructions
――――――――――――――――――――――――――――――――――――――
🔷 INPUTS
Pivot Left/Right Bars — swing detection window. Default 10/10.
Zone Width / Merge Distance — band thickness and clustering tolerance, in ATR. Default 0.5 / 0.75.
Break Buffer / Rejection Distance — how far price must close beyond or travel back from a zone to resolve a test. Default 0.25 / 0.75 ATR.
Post-Flip Cooldown — bars a flipped zone must survive before a break can retire it. Default 5.
Warmup Samples — resolved tests required before the classifier is trusted. Default 25.
Conviction Threshold — probability at which a zone is shown at full conviction. Default 0.62.
Max Live Zones / Show Distance — how many nearby zones are drawn and how far (in ATR) before one is hidden.
Show Trend EMA, Zen Mode — display toggles; Zen Mode hides labels and the table for clean screenshots.
――――――――――――――――――――――――――――――――――――――
🔷 REQUIREMENTS AND LIMITATIONS
🔸 Pivots confirm only after the right-side lookback bars close — a level appears on the chart later than the swing that created it, by design
🔸 One thing does refine retroactively: when a later pivot merges into an existing zone, its band re-centers toward the weighted average — a zone with an open test is never re-centered, so no in-progress outcome is affected
🔸 Early on a fresh chart, or for a zone with only one or two tests, its own read is thin — the model's overall sample count travels with every verdict so that's never hidden
🔸 This script reports how historical arrivals resolved. It does not predict, and it is not a trading system on its own.
――――――――――――――――――――――――――――――――――――――
Built in Pine Script v6. Open source — Mozilla Public License 2.0. Indicador

ES/NQ Daily Levels Paste-In Sup/Res MapperDaily Levels is a manual, paste-in mapping tool. Paste a list of price levels into the settings and it draws them on your chart as clean lines and shaded zones with labels. It does not calculate signals or repaint — it simply renders the levels you enter.
Works on any symbol — ES, NQ, SPY, SPX, stocks, futures, forex, and crypto. Just paste levels that match that instrument's price.
Leave the box blank and it shows a few sample reference levels around current price (clearly tagged "sample", 10 points apart by default) so you can see how it works on any chart. The samples auto-hide the moment you paste your own levels. (The 10-point default spacing suits ES/NQ; for other instruments set the spacing to fit, or set it to 0 for auto.)
WHAT IT DRAWS
- Single prices → horizontal lines with labels
- Ranges (e.g. 5200-5205) → shaded zones
- Section groups you can label: Resistances, Supports, and special groups (Backtest, Add, Breakdown, Short)
- Tag any level "(major)" and it renders thicker
DYNAMIC S/R FLIP (optional)
When enabled, each level you paste under Supports/Resistances is colored by where price is right now:
- Price above the level → acts as support (green, "S")
- Price below the level → acts as resistance (red, "R")
- Price inside a zone → neutral / in-play (yellow)
Turn it off to keep the exact section labels you pasted.
HOW TO USE
1. Add the indicator to your chart.
2. Open its settings → "PASTE YOUR DAILY LEVELS HERE".
3. Paste your levels, one section per line, for example:
Resistances: 5210, 5218 (major), 5225-5228
Supports: 5188, 5175 (major)
4. Lines, zones, and labels draw automatically. Colors, widths, spacing, and label styling are all configurable.
NOTE
The sample levels are auto-generated placeholders for demonstration only — they are not recommended levels and should not be used for trading. This tool does not generate, suggest, or predict levels; it only displays the ones you enter.
For educational purpose Indicador

Untested Levels - PD Highs, Lows & GapsUntested Levels automatically maps the session prices futures traders commonly mark by hand: previous regular-session highs and lows, current and prior overnight highs and lows, previous closes and unfilled gap levels, plus the all-time high.
The purpose is simple: spend less time redrawing levels every morning and keep important price context visible as the market develops. Each line begins where its high, low, or close was established and is labeled with both its name and exact price.
The indicator is designed around the session structure of CME equity index futures, particularly Nasdaq futures (NQ/MNQ) and S&P 500 futures (ES/MES). Its session times are fully configurable, so the same framework can be used with other futures markets whose trading sessions are defined appropriately.
WHY IT IS DIFFERENT
Many session-level tools either show only the most recent day or remove a level as soon as price reaches it. This indicator maintains a structured history and treats a level's first breach separately from its display timing.
By default, a prior level that is breached during the current trading day remains visible until the day rolls over. This preserves the line for the rest of the session, allowing you to see whether a former high or low is subsequently respected, rejected, or used as support or resistance. If you prefer immediate removal, the "Hide breached levels immediately" setting is available.
Regular-session highs and lows, overnight highs and lows, and prior closes each have their own lookback setting. You can retain more history for one class of level without overcrowding the chart with every other class.
The calculations are session-defined rather than chart-defined. They are built from the symbol's extended-hours feed, so switching the chart between Regular Trading Hours and Electronic Trading Hours does not change the underlying levels. An RTH chart can therefore remain visually clean while still displaying the overnight high and low.
LEVEL NAMES
The numbering follows trading days, not calendar dates. The overnight session belongs to the same trading day as the regular session that follows it.
YD High / YD Low
Yesterday's regular-session high and low.
PD 2 High / PD 2 Low
The regular-session high and low from two trading days ago.
PD 3, PD 4, and later numbers continue in the same way.
YD is effectively the first prior trading day, so there is no separate
"PD 1 High" or "PD 1 Low" label.
ON High / ON Low
The current trading day's overnight-session high and low.
These update while the overnight session is forming.
ETH 1 High / ETH 1 Low
The overnight high and low associated with yesterday's regular session.
ETH 1 therefore pairs with YD.
ETH 2 High / ETH 2 Low
The overnight high and low from two trading days ago.
ETH 2 pairs with PD 2, ETH 3 pairs with PD 3, and so on.
YD Close
The most recent configured session close. This level always displays when
previous-close levels are enabled.
PD 2 Close, PD 3 Close, etc.
Older configured closes that remain unfilled by a later regular session.
These levels identify still-open historical gaps within the selected
gap lookback.
ATH
The all-time high. If a displayed high is also the all-time high, its
normal label receives an ATH prefix. If the all-time high is not one of
the displayed session levels, a separate ATH line is drawn.
SESSION CALCULATIONS
Each configured trading day is divided into three parts:
Overnight session:
Trading-day start to the regular-session open.
This produces ON and ETH highs and lows.
Regular session:
Regular-session open to regular-session close.
This produces YD and PD highs and lows.
Post-close tail:
Regular-session close to the next trading-day start.
This does not create a new session high or low, but its price action can
breach an existing level.
The default times are expressed in Pacific Time:
Trading day starts: 15:00
Regular session opens: 06:30
Regular session closes: 13:15
Close candle opens: 13:55
The time zone and all session boundaries can be changed in the settings. The "Close candle" input identifies the opening time of the candle whose closing price will be stored. If that exact candle is unavailable, the script uses the last available candle before the selected time.
WHAT COUNTS AS UNTESTED
A prior regular-session high remains unbreached until later price trades above it. A prior regular-session low remains unbreached until later price trades below it. The calculation considers price action after the level's own regular session, including that day's post-close tail, later overnight sessions, and later regular sessions.
An overnight high or low is evaluated only against price action after that overnight session ends. This prevents the price action that created the level from also invalidating it.
By default, an exact touch does not count as a breach; price must trade through the level. Enable "Exact touch counts as a breach" if you want a touch to invalidate it.
YD High, YD Low, ON High, ON Low, and YD Close remain available as current reference levels even when tested. Older PD and ETH levels are filtered according to their breach status and your selected display timing.
PREVIOUS CLOSES AND GAPS
YD Close always shows when enabled. Older closes appear as PD n Close only while their gap remains unfilled.
Gap status is based on later regular-session price action. Overnight and post-close-tail activity do not fill a close gap. This keeps the gap logic aligned with the cash-session context rather than allowing overnight movement alone to remove the level.
An alert condition is included for price touching or crossing YD Close during the regular session.
ALL-TIME HIGH
The ATH calculation combines available chart history, extended-hours intraday history, and extended daily history. If the ATH matches a displayed high, that label is prefixed with ATH and emphasized. Otherwise, the indicator creates a standalone ATH level so the price remains marked even when it falls outside the selected session lookbacks.
LOOKBACKS AND DISPLAY CONTROLS
The indicator provides independent controls for:
• Regular-session high/low lookback
• Overnight high/low lookback
• Prior-close and gap lookback
• YD, PD, ON, ETH, close, ATH, and label visibility
• Immediate or end-of-day removal of breached levels
• Exact-touch breach behavior
• Session times and time zone
• Colors, line style, line width, label size, and label offset
Separating the lookbacks makes it possible to retain a broad history of untested highs and lows while using a shorter window for overnight levels or gaps.
RTH AND ETH CHART BEHAVIOR
All session values are requested from extended-hours data, so the same calculated levels appear whether the chart is displaying RTH or ETH candles.
TradingView scripts only execute when the chart receives a bar. An RTH chart therefore cannot update live while its chart session is closed. To handle this, "Roll levels at the regular session close" is enabled by default. It advances the labels and removes levels breached during the completed day on the final regular-session bar, leaving a frozen RTH chart in the correct end-of-session state. The extended-hours feed completes the normal rollover when the next chart session begins.
For live overnight development of ON High and ON Low, use an ETH chart.
HOW TO USE THE LEVELS
These lines identify historically significant prices; they do not predict which level price will visit or how price will react when it gets there. Traders may use them as context for targets, breakouts, failed breakouts, support/resistance flips, gap fills, and confluence with their own trade setups.
The retained-line behavior is especially useful after a breach: instead of losing the reference immediately, you can observe whether price returns to the level and changes its behavior around it later in the same session.
LIMITATIONS
This indicator is intended for intraday charts. Its session calculations use an extended-hours intraday feed, set to five minutes by default. Available lookback depth depends on the amount of intraday history TradingView provides for the symbol and the user's plan.
Session defaults are designed for the stated CME equity index futures workflow. Confirm and adjust the time zone, trading-day start, regular-session boundaries, and close-candle time before using the indicator on another market.
Holiday schedules, shortened sessions, missing bars, exchange data differences, and delayed feeds can affect the levels. Use standard price charts and verify the settings for the instrument being traded.
Untested Levels is a charting and market-context tool, not a trading system. It does not provide entries, exits, profit targets, or guarantees of future support or resistance. Indicador

Market Compass - Dynamic Range FrameworkHello English readers, the English version is provided below. Please scroll down to view it.
Market Compass - Dynamic Range Framework
市场指南针 · 动态区间框架
版本:1.0 | 类型:非预测性价格结构定位工具 | 作者:
绝大多数交易亏损,根源并非方向判断错误,而是 “位置感”的缺失 。本指标旨在为您解决这一核心痛点——它不告诉您涨跌,但它告诉您 “此时此刻,价格在地图上的精确坐标” 。
---
本指标并非传统的均线或动量振荡器,而是一个 基于固定回溯周期的价格百分位区间定位系统 。它以最近 N 根 K 线(默认 252 根,对应约 1 个交易年度)的最高价与最低价为天然边界,构建出一个覆盖 0% 至 100% 的 动态箱体网格 。
该网格并非平均分割,而是采用 非对称的黄金分割与极值锚定法 ,精确定制了 9 条关键水平轨道。这些轨道以彩色矩形色带和右侧实时浮动标签的形式,干净利落地叠加于主图 K 线之上:
100% 顶部极值轨 (红色):回溯周期内的绝对天花板。
89% 超买警戒轨 (橙色):情绪极度亢奋区,多头衰竭高发带。
75% 强势分界轨 (黄色):牛熊分水岭,站上此线意味中期趋势转强。
62.5% 强界枢轴轨 (紫色):多头趋势中的次级回踩支撑位。
50% 多空中轴轨 (白色):价值均衡线,长线资金的成本密集区。
37.5% 弱界枢轴轨 (青色):空头趋势中的次级反弹阻力位。
25% 弱势分界轨 (亮蓝):跌破此线意味中期趋势正式转入空头。
11% 超卖警戒轨 (浅绿):情绪极度恐慌区,空头衰竭高发带。
0% 底部极值轨 (深蓝):回溯周期内的绝对地板。
随着新 K 线的生成,整个框架会 滚动迭代 ,始终锚定最新的价格活动范围,确保参考坐标永不失效。
---
传统价格图表存在严重的 视角局限性 ,导致交易者频繁陷入误判:
“绝对值幻觉”与锚定效应 :股价 100 元是高是低?脱离近期波动区间谈绝对价格毫无意义。本指标将价格转化为 0~100 的相对百分位数 ,消除了价格基数的干扰,让您客观评判当前价格是“相对高位”还是“相对低位”。
“区间失忆症”与近因偏好 :人类大脑天然对最近 5~10 根 K 线赋予过高权重,极易遗忘前期关键的支撑与阻力结构。本指标通过固定窗口的滚动计算,强制将 过去 N 根 K 线的价格极值 醒目地绘制在当前图表上,纠正了这种认知偏差。
均值回归与极端磁吸理论 :金融市场价格长期遵循 “极端值向中轴(50% 均衡线)回归” 的统计规律。当价格进入 89% 以上或 11% 以下的极端尾部区域时,统计概率上必然面临向 50% 中轴的牵引力。本框架为这种“牵引力”提供了精确的量化刻度。
---
本指标是 趋势过滤、盈亏比评估与动态止盈止损 的绝佳辅助工具。请勿将其视为独立入场信号,而应作为 “价格行为决策的量化底座” 。
3.1 基于市场环境的三种经典战法
【趋势跟踪战法】—— 适用于强势单边行情
当价格经过充分调整后,以放量大阳线有效突破 75% 强势分界轨 时,视为中期趋势由震荡转强的关键确认点。若后续价格回踩 75% 轨并获得支撑(收出长下影线),则为绝佳的 顺大势、逆小势 加仓机会。此时可将止损设于 62.5% 强界枢轴轨下方。
【均值回归战法】—— 适用于宽幅震荡行情
当价格快速冲高至 89% 超买轨 上方,且 K 线出现明显滞涨形态(如射击之星、看跌吞没)时,可视为短线高空机会,第一目标位看向 75% 轨,第二目标位看向 50% 中轴。反之,价格急跌至 11% 超卖轨 下方并出现止跌反转形态时,可视为短线低吸机会。
【突破回踩确认战法】—— 适用于关键阻力支撑转换
任何一条百分比轨道都具备动态支撑/阻力的属性。当价格自下而上突破某一轨道(如 62.5% 轨)后,若随后缩量回踩该轨道且未跌破,则说明该轨道已由阻力转换为支撑,此处是风险收益比极高的 “0 级入场点” (止损极小,空间极大)。
3.2 动态止盈与止损设置指南
波段多头持仓 :可将 37.5% 弱界枢轴轨 设为最终的硬性离场线。只要价格在此轨之上,多头头寸便可安心持有,避免被早期震荡洗出。
短线空头持仓 :可将 62.5% 强界枢轴轨 设为硬性止损线。一旦价格强势反抽并站上此轨,则空头逻辑被证伪,需果断离场。
3.3 参数动态调整建议(针对不同交易周期)
日线级别(中长线 / 波段) :建议保持默认 252 (约 1 年交易日),用于捕捉年度大箱体的牛熊转换。
周线级别(大趋势 / 仓位布局) :建议调整为 52 (约 1 年周线),用于识别超大周期的价格百分位极值。
小时 / 分钟级别(日内短线 / 剥头皮) :建议调整为 50 ~ 100 ,过长的周期在分钟图上会导致框架钝化,失去短线参考意义。
---
4.1 最佳适用场景
流动性充裕的权益市场 :沪深 300、中证 500、标普 500 等主流指数及成分股。
高流动性大宗商品与外汇 :黄金、原油、欧元/美元等主要交易对。
高市值加密货币 :比特币(BTC)、以太坊(ETH)等。
4.2 禁用与慎用场景(风控红线)
严禁用于上市不足 N 根 K 线的新股/次新股 :尽管代码内置了自适应缩窄逻辑,但新股价格极不稳定,高低点极易被操纵,百分位框架参考价值极低。
慎用于连续无量涨跌停的极端行情 :在极强的单边轧空或流动性枯竭的踩踏中,价格可能长期粘合在 100% 轨之上或 0% 轨之下,此时指标出现 “钝化” 现象,需立即切换至趋势跟踪指标(如 SAR 抛物线或均线系统)进行二次印证。
慎用于高度控盘的“庄股”或低成交量仙股 :稀疏的成交导致价格跳跃性极大,计算出的区间极易失真。
---
本指标严格遵循 TradingView 最佳实践, 完全不包含未来函数 ,所有信号均基于确定性的历史数据实时滚动计算。
5.1 自适应周期核心算法
系统优先读取用户设定的 `lookbackLength`(默认 252)。然而,当图表加载的品种上市天数不足时,引擎会自动触发保护机制:
effectiveLookback = math.min(i_lookbackLength, bar_index + 1)
该行代码确保指标在上市首日即能工作,且随着新 K 线增加,窗口期自然增长,直至达到用户设定的标准周期。
5.2 九宫格线性映射(百分位分割数学)
首先确定箱体极值与范围:
periodLow = ta.lowest(low, effectiveLookback) // 底部 0%
periodHigh = ta.highest(high, effectiveLookback) // 顶部 100%
priceRange = periodHigh - periodLow
随后基于 斐波那契数列与统计学标准差启发式阈值 进行非均匀切割:
priceL89 = periodLow + priceRange * 0.89 // 极值警戒
priceL75 = periodLow + priceRange * 0.75 // 强市分界
priceL625 = periodLow + priceRange * 0.625 // 黄金分割枢轴
priceL50 = periodLow + priceRange * 0.50 // 均衡中轴
// ... 下方对称切割同理
注:62.5% 与 37.5% 的选取来源于对 0.618 黄金分割率的整数微调,旨在提供比传统 61.8% 更为清晰且易于记忆的刻度。
5.3 图形渲染引擎优化(内存与性能管理)
为了避免在大量历史 K 线上重复绘制矩形和线条导致图表卡顿,引擎采用 “惰性删除与单次实例化” 策略:
if barstate.islast
// 仅当加载完成且运行至图表最右侧时触发绘制
box.delete(boxMain) // 先销毁旧句柄
line.delete(lineL100) // 清理旧线
// ... 重新创建新对象
所有标签采用 label.style_label_left 右对齐样式,确保在图表最右侧整齐排列,绝不遮挡最新的 K 线实体,同时提供精确至交易所最小报价单位(`format.mintick`)的实时读数。
---
它不是占卜未来的水晶球,而是衡量当下的卡尺。
在充满不确定性的金融市场中, “位置感” 是纪律执行的基石。`Market Compass` 为您提供的不是圣杯,而是一张永远保持更新的 战场态势感知地图 。请将它融入您现有的交易系统中,作为过滤低质量交易机会的第一道关卡。
---
本指标及此说明文件仅供教育及技术分析参考之用,绝不构成任何形式的买入、卖出或持仓建议。金融衍生品及证券交易蕴含巨大风险,过往价格结构及百分位分布不构成对未来走势的绝对保证。您必须结合自身财务状况、风险承受能力及独立研判做出交易决策,盈亏自负。作者不承担任何因使用本指标而产生的直接或间接损失。
---
如果您认可这套价格定位逻辑,欢迎点赞、收藏并关注!
期待您在评论区分享将该框架融入实战交易后的心得体会。
Market Compass - Dynamic Range Framework
Version: 1.0 | Type: Non-Predictive Price Structure Positioning Tool | Author:
The vast majority of trading losses stem not from incorrect directional judgment, but from a lack of "positional awareness" . This indicator addresses this core pain point — it does not tell you whether price will go up or down, but it does tell you "the precise coordinates of price on the map, at this very moment" .
---
This indicator is not a traditional moving average or momentum oscillator. Instead, it is a price percentile range positioning system based on a fixed lookback period . It uses the highest high and lowest low over the most recent N bars (default 252, corresponding to approximately one trading year) as natural boundaries, constructing a dynamic box grid spanning from 0% to 100%.
The grid is not evenly divided. It employs an asymmetric golden ratio and extreme-value anchoring methodology to precisely define 9 key horizontal threshold levels. These levels are cleanly overlaid on the main price chart using colored rectangular bands and real-time right-aligned floating labels:
100% Peak Threshold (Red): The absolute ceiling within the lookback period.
89% Overbought Warning Zone (Orange): Extreme euphoria zone; high probability of bullish exhaustion.
75% Bullish Boundary (Yellow): The bull-bear dividing line; breaking above signals medium-term strength.
62.5% Bull Pivot Threshold (Purple): Secondary retracement support level within an uptrend.
50% Equilibrium Axis (White): The value equilibrium line; a dense area of long-term capital cost.
37.5% Bear Pivot Threshold (Cyan): Secondary retracement resistance level within a downtrend.
25% Bearish Boundary (Light Blue): Breaking below signals a confirmed medium-term bearish trend.
11% Oversold Warning Zone (Light Green): Extreme panic zone; high probability of bearish exhaustion.
0% Floor Threshold (Dark Blue): The absolute floor within the lookback period.
As new bars are generated, the entire framework rolls forward iteratively , always anchored to the most recent price activity range, ensuring the reference coordinates never become obsolete.
---
Traditional price charts suffer from severe perspective limitations , leading traders into frequent misjudgments:
"Absolute Value Illusion" and Anchoring Bias : Is a price of $100 high or low? Discussing absolute price without reference to the recent trading range is meaningless. This indicator converts price into a relative percentile from 0 to 100 , eliminating the distortion of price magnitude and allowing you to objectively assess whether the current price is "relatively high" or "relatively low."
"Range Amnesia" and Recency Bias : The human brain naturally assigns excessive weight to the most recent 5–10 bars, easily forgetting key prior support and resistance structures. Through rolling window calculations, this indicator forcibly and prominently plots the price extremes of the past N bars on the current chart, correcting this cognitive bias.
Mean Reversion and Extreme Magnetic Attraction Theory : Financial market prices have long exhibited a statistical tendency to "revert from extreme values toward the center (50% equilibrium line)" . When price enters the extreme tail regions above 89% or below 11%, statistical probability dictates an inevitable gravitational pull toward the 50% axis. This framework provides precise quantitative刻度 for this "magnetic force."
---
This indicator serves as an excellent auxiliary tool for trend filtering, risk-reward assessment, and dynamic stop-loss/take-profit placement . Do not treat it as an independent entry signal; instead, regard it as a "quantitative foundation for price-action decision-making."
3.1 Three Classic Strategies Based on Market Context
【Trend Following Strategy】— For Strong Directional Markets
When price, after sufficient consolidation, breaks decisively above the 75% Bullish Boundary with a high-volume bullish candle, this serves as a key confirmation that the medium-term trend is shifting from consolidation to strength. If price subsequently retests the 75% level and finds support (forming a long lower wick), it represents an excellent "go with the macro trend, counter the micro pullback" add-on opportunity. In such cases, place your stop-loss below the 62.5% Bull Pivot Threshold.
【Mean Reversion Strategy】— For Range-Bound Markets
When price spikes rapidly above the 89% Overbought Warning Zone and simultaneously exhibits clear exhaustion patterns (such as shooting stars or bearish engulfing), this can be viewed as a short-term selling opportunity. The first target is the 75% level, and the second target is the 50% Equilibrium Axis. Conversely, when price plummets below the 11% Oversold Warning Zone and shows reversal signals, a short-term buying opportunity emerges.
【Breakout-Pullback Confirmation Strategy】— For Key Support/Resistance Transitions
Every percentage threshold possesses dynamic support/resistance properties. When price breaks upward through a given level (e.g., the 62.5% level) and subsequently retests that level on diminishing volume without breaking back below, this confirms that the level has successfully transitioned from resistance to support. This represents a highly favorable "Grade-A Entry Point" (minimal stop-loss, substantial upside potential).
3.2 Dynamic Stop-Loss and Take-Profit Placement Guide
Swing Long Positions : Use the 37.5% Bear Pivot Threshold as your ultimate hard exit line. As long as price remains above this level, you can confidently hold your long position, avoiding premature exits caused by early-stage volatility.
Short-Term Short Positions : Use the 62.5% Bull Pivot Threshold as your hard stop-loss line. Should price stage a strong rally and close above this level, the bearish thesis is invalidated, and you must exit decisively.
3.3 Parameter Adjustment Recommendations (By Trading Timeframe)
Daily Chart (Swing / Medium-to-Long Term) : Keep the default 252 (approximately one trading year), ideal for capturing annual bull-bear transitions.
Weekly Chart (Macro Trend / Position Sizing) : Consider adjusting to 52 (approximately one year of weekly bars) for identifying extreme percentiles within broader cycles.
Hourly / Minute Charts (Intraday / Scalping) : Consider adjusting to 50–100 . Longer lookbacks on lower timeframes cause the framework to become overly rigid, diminishing its short-term relevance.
---
4.1 Optimal Use Cases
Highly Liquid Equity Markets : CSI 300, S&P 500, major index constituents, and liquid individual stocks.
High-Liquidity Commodities and FX : Gold, Crude Oil, EUR/USD, and other major pairs.
Large-Cap Cryptocurrencies : Bitcoin (BTC), Ethereum (ETH), and similar assets.
4.2 Scenarios to Avoid or Use with Caution (Risk Red Lines)
Strictly avoid newly listed stocks with fewer than N bars of history : Although the code includes a built-in adaptive shortening mechanism, new issues are extremely unstable, and their highs/lows are vulnerable to manipulation, rendering the percentile framework nearly worthless.
Use with caution during continuous limit-up/limit-down extreme conditions : In powerful short squeezes or liquidity-driven crashes, price may remain persistently glued above the 100% level or below the 0% level. In such cases, the indicator becomes "blunted" , and you must immediately switch to trend-following tools (such as SAR or moving average systems) for secondary confirmation.
Avoid low-float "pump-and-dump" penny stocks : Sparse trading volume leads to erratic price jumps, causing the computed range to become highly distorted.
---
This indicator strictly adheres to TradingView best practices and contains absolutely no future functions . All signals are computed in real time based on deterministic historical data.
5.1 Adaptive Lookback Core Algorithm
The system first reads the user-defined `lookbackLength` (default 252). However, when the loaded instrument has fewer total bars on the chart than the configured period, the engine automatically triggers a protective mechanism:
effectiveLookback = math.min(i_lookbackLength, bar_index + 1)
This single line ensures the indicator functions from the very first trading day, and the window gradually expands as new bars are added until it reaches the user's desired standard period.
5.2 Nine-Level Linear Mapping (Percentile Segmentation Mathematics)
The process begins by determining the box extremes and range:
periodLow = ta.lowest(low, effectiveLookback) // Floor at 0%
periodHigh = ta.highest(high, effectiveLookback) // Peak at 100%
priceRange = periodHigh - periodLow
The range is then divided using a heuristic blend of Fibonacci ratios and statistically inspired thresholds :
priceL89 = periodLow + priceRange * 0.89 // Extreme warning
priceL75 = periodLow + priceRange * 0.75 // Bullish boundary
priceL625 = periodLow + priceRange * 0.625 // Golden ratio pivot
priceL50 = periodLow + priceRange * 0.50 // Equilibrium axis
// ... Symmetrical lower-level calculations follow the same logic
Note: The selection of 62.5% and 37.5% is derived from a slight integer adjustment to the 0.618 golden ratio, intended to provide cleaner and more memorable reference刻度 than the traditional 61.8%.
5.3 Rendering Engine Optimization (Memory & Performance Management)
To prevent chart lag caused by repeatedly drawing rectangles and lines across numerous historical bars, the engine employs a "lazy deletion with single-instantiation" strategy:
if barstate.islast
// Only triggered when loaded and running at the rightmost edge of the chart
box.delete(boxMain) // Destroy old handles first
line.delete(lineL100) // Clean up old lines
// ... Then create new objects
All labels use the label.style_label_left right-aligned format, ensuring they line up neatly on the far right of the chart without ever obscuring the most recent price bars. Prices are displayed with precision down to the exchange's minimum tick size (`format.mintick`).
---
It is not a crystal ball for predicting the future; it is a caliper for measuring the present.
In the inherently uncertain financial markets, "positional awareness" is the cornerstone of disciplined execution. `Market Compass` does not offer you a holy grail; it offers you an ever-updating situational awareness map of the battlefield . Integrate it into your existing trading system and use it as the first filter to eliminate low-probability trade setups.
---
This indicator and its accompanying description are provided for educational and technical analysis purposes only. They do not constitute, and should not be construed as, any form of investment advice or recommendation to buy, sell, or hold any financial instrument. Trading securities and derivatives involves substantial risk of loss. Past price structures and percentile distributions do not guarantee future results. You are solely responsible for your own trading decisions, taking into account your financial situation, risk tolerance, and independent judgment. Neither the author nor the hosting platform accepts any liability for losses arising from the use of this indicator.
---
If you find this price-positioning logic valuable, please like, bookmark, and follow!
I look forward to hearing how you integrate this framework into your live trading. Feel free to share your experiences and feedback in the comments section below.
Indicador

Previous Day Pivot Path - Intraday Support ResistancePrevious Day Pivot Path - Intraday Support Resistance
Overview
Previous Day Pivot Path is an intraday reference-level study built from the confirmed OHLC values of the previous selected trading day. It plots the current day's central pivot and support/resistance levels, then records the first chart bar in which each level is reached and assigns a compact arrival rank.
The script is intended for traders and researchers who want to identify the current day's mathematically derived reference levels without converting them into buy/sell instructions. It does not predict whether a level will hold or break, and it does not present win-rate, profitability, or performance claims.
What makes this implementation different
1. First-arrival path instead of static lines only
Each tracked level begins the day as pending. When the selected price source first reaches it, the script records an arrival rank and can place a numbered badge at the corresponding time.
If more than one previously unreached level is reached in the same chart bar, those levels receive the same rank. OHLC bars do not reveal the true tick-by-tick order inside that bar, so the script deliberately avoids inventing an intrabar sequence that the available data cannot prove.
2. Reached-level fading and next-level focus
Reached levels can fade automatically. The nearest unreached level can receive stronger line emphasis and an optional translucent focus halo. After all displayed levels have been reached, the focus can fall back to the nearest level or remain inactive.
This visual hierarchy separates completed parts of the day's path from levels that remain unvisited, while preserving the exact horizontal prices.
3. Confirmed previous-day data
All daily formula inputs are requested from the last completed daily bar. Open time, close time, open, high, low, and close are all offset by one daily bar before they are used. The current developing daily high, low, or close is never used in the pivot formulas.
The script also checks that the completed daily session is chronologically aligned with the selected intraday source day before it initializes new levels or arrival events.
4. Source-session freshness protection
Three OHLC source modes are available:
- Automatic: uses chart-context OHLC on standard candles and standard-symbol OHLC on non-standard charts.
- Chart context: preserves the chart's ticker modifiers, session, adjustment, and chart-type context.
- Standard symbol: removes non-standard ticker modifiers and uses standard market OHLC.
When the selected standard source has no bar aligned with the current chart timestamp, the script does not reuse an old forward-filled OHLC value. Arrival events pause, and existing drawings remain fixed at the last valid source bar until aligned data becomes available again.
5. Session-aware day handling
The script uses a trading-day key suitable for markets whose sessions cross midnight. This prevents a simple calendar-date change from being treated as the session boundary on many overnight Forex and futures markets.
If the first loaded dataset begins after the selected source day's opening bar, the earlier first-arrival sequence is unknowable. For that one partial day, arrival tracking and open-dependent features are conservatively bypassed rather than reconstructed from incomplete history.
6. Time-anchored persistent drawings
Persistent lines, boxes, right-edge labels, and arrival badges use UNIX-time coordinates. This avoids relying on very old bar_index coordinates on dense second charts and keeps historical drawings independent of the number of bars elapsed since their creation.
7. Multiple formula families plus an editable research mode
The script includes:
- Traditional
- Classic
- Fibonacci
- Camarilla
- Custom research
The custom mode lets users select the pivot center and edit three previous-range multipliers. The multipliers are sorted from smallest to largest before assignment to R1/S1, R2/S2, and R3/S3.
8. Price-grid and duplicate-level controls
Calculated levels can remain raw, round to the nearest minimum tick, or round outward so resistance is rounded upward and support downward. When rounding produces the same price for multiple logical levels, the script can merge them into one line and one badge with a combined code such as P/R1.
9. Researchable arrival definitions
Users can define a first arrival with:
- Wick range
- Candle body range
- Confirmed close crossing
Optional tolerance can be exact, a number of ticks, or a percentage of the previous-day range. Gap crossings can be counted or ignored. Arrival ranking can follow only displayed levels, the selected depth, or all levels produced by the formula.
10. Deliberate chart hygiene
The default presentation prioritizes P, R1/S1, and then outer levels through width, line style, transparency, and optional reached-level fading. Right-edge labels support automatic text contrast and horizontal lane staggering when prices are close.
Optional context references include:
- Central Pivot Range (CPR)
- Previous-day high and low (PDH/PDL)
- Previous-day close (PDC)
- Current selected-source day open
- Opening bracket between the nearest displayed levels above and below the day open
- Compact session brief
All context elements can be disabled independently.
Formula reference
Let O, H, L, and C be the confirmed previous selected daily bar, and let Range = H - L.
Traditional
P = (H + L + C) / 3
R1 = 2P - L
S1 = 2P - H
R2 = P + Range
S2 = P - Range
R3 = H + 2(P - L)
S3 = L - 2(H - P)
Classic
P = (H + L + C) / 3
R1 = 2P - L
S1 = 2P - H
R2 = P + Range
S2 = P - Range
R3 = P + 2Range
S3 = P - 2Range
Fibonacci
P = (H + L + C) / 3
R1/S1 = P +/- 0.382 x Range
R2/S2 = P +/- 0.618 x Range
R3/S3 = P +/- 1.000 x Range
Camarilla
P = (H + L + C) / 3
R1/S1 = C +/- 1.1 x Range / 12
R2/S2 = C +/- 1.1 x Range / 6
R3/S3 = C +/- 1.1 x Range / 4
Custom research
The center can be HLC3, HLCC4, OHLC4, midpoint, or previous close. Three editable multipliers are applied symmetrically to the previous-day range after being sorted from smallest to largest.
Arrival timing
Confirmed bar
This is the reproducible default. An arrival is recorded only after the chart bar is confirmed.
Live bar
Live timing is available for wick arrivals. Intrabar-persistent state latches a wick touch across realtime updates of the open bar. Because all levels first reached inside the same chart bar share one rank, the script does not claim a tick-level order that bar data cannot establish.
Body and close-cross modes automatically use confirmed bars to avoid transient open-bar signals.
Non-standard charts
Heikin-Ashi, Renko, Kagi, Line Break, Point & Figure, and Range bars can be synthetic or approximate. Automatic mode uses standard-symbol OHLC for the level and event source on non-standard charts, but arrival events are paused by default. Users can explicitly allow them for research after accepting the chart-type limitation.
The script is designed for time-based intraday charts. Tick charts and daily-or-higher charts are intentionally rejected with a visible notice rather than processed with ambiguous session assumptions.
Language and user interface
English is the default dynamic chart language. Selecting 日本語 changes dynamic labels, tooltips, safety notices, session-brief text, and language-aware alert() messages. Input names remain short bilingual labels so both English and Japanese users can configure the study.
Key Japanese UI translations:
未到達 = Pending
到達 = Reached
確定足 = Confirmed bar
ライブ・ヒゲ保持 = Live wick latch
前日値幅 = Prior range
次の未到達 = Next unreached
準備完了 = Ready
ソース足なし = Source bar unavailable
日次データ整合待ち = Aligning daily data
合成足イベント停止 = Synthetic events paused
International level codes such as P, R1, S1, PDH, and PDL remain unchanged in both languages.
Alerts
Neutral alert conditions are available for:
- Any pivot's first arrival
- P, R1, S1, R2, S2, R3, and S3 first arrivals
- Confirmed close crossing above or below P
An optional language-aware alert() call can include the reached level codes, shared rank, symbol, timeframe, and selected calculation method. Alerts describe observable level events only; they are not trade recommendations.
Suggested workflow
1. Use a standard candlestick intraday chart for the most direct interpretation.
2. Keep Automatic, Traditional, Nearest tick, Confirmed bar, and Wick for the conservative defaults.
3. Select the desired level depth and optional previous-day references.
4. Enable live timing only when intrabar wick monitoring is required.
5. Create alerts from the neutral first-arrival or confirmed P-cross conditions as needed.
6. Use Market Replay and several symbols/session types before relying on customized settings.
Important limitations
- A previous-day pivot is a mathematical reference, not a prediction that price will reverse or continue.
- Data vendors can revise historical bars, and exchange session definitions can differ across instruments.
- Standard-symbol mode can intentionally have no aligned bar outside its selected session. In that case, events pause instead of carrying stale OHLC forward.
- The first loaded partial source day cannot provide a complete earlier arrival sequence.
- A chart bar cannot prove the order of multiple level touches inside that bar; those first touches share one rank.
- Live wick tracking reacts to realtime updates. Reloaded historical bars contain finalized OHLC, not the original tick stream.
- Synthetic chart bars may not represent executable market prices. Arrival tracking on such charts is disabled by default.
- The study does not provide entries, exits, position sizing, stop placement, or performance statistics.
日本語説明
概要
Previous Day Pivot Pathは、選択したデータソースの確定済み前日OHLCから、当日のP・R・Sを自動計算して描画する日中足向けインジケーターです。
単に水平線を表示するだけではなく、各水準へ当日初めて到達したチャート足を記録し、到達順を番号で表示できます。売買推奨、勝率、収益性、将来予測を提示するものではなく、当日の数理的な節目と到達経路を研究するためのツールです。
主な特徴
初回到達経路
各水準は当日開始時に未到達状態となり、選択した価格ソースが初めて到達すると順位を記録します。同じチャート足の中で複数水準へ初回到達した場合、その足の内部順序はOHLCだけでは証明できないため、すべて同順位とします。
確定前日OHLC
日足リクエストでは、時刻・始値・高値・安値・終値のすべてを1本前へオフセットして使用します。形成中の日足高安や終値はピボット計算に使いません。
ソース欠損時の安全処理
標準銘柄ソースに現在時刻と一致する足がない場合、過去のOHLCを現在足へ持ち越して判定しません。到達イベントを停止し、既存描画を最終有効ソース足で固定します。
夜間市場を考慮した日付管理
Forexや先物など、セッションが日付をまたぐ市場に対応するため、単純なカレンダー日ではなく取引日キーを使用します。
秒足で古くなった描画への耐性
長期間保持する線、ボックス、到達バッジ、右端ラベルはUNIX時刻座標で管理します。高密度な秒足でも、古いbar_index座標による制限へ近づきにくい設計です。
5種類の計算方式
Traditional、Classic、Fibonacci、Camarilla、Custom researchを選択できます。Custom researchでは中心値と3つの前日値幅倍率を変更できます。
到達判定の研究性
ヒゲ、実体、確定終値通過から選択でき、許容幅は厳密一致、ティック数、前日値幅比率から設定できます。ギャップ通過を到達扱いにするかも切替可能です。
視認性
到達済み水準のフェード、最寄り未到達水準の強調、フォーカスハロー、自動文字コントラスト、近接ラベルの横方向段組みを実装しています。
CPR、前日高安、前日終値、当日始値、始値ブラケット、セッション概要は個別に表示・非表示を変更できます。
推奨初期設定
OHLC source Automatic
Pivot method Traditional
Level rounding Nearest tick
Arrival timing Confirmed bar
Arrival basis Wick
Touch tolerance Exact
Arrival universe Displayed levels
Synthetic chart events Off
Auto-stagger labels On
Auto contrast On
Focus halo On
ライブ中のヒゲ到達を監視するときだけ、Arrival timingをLive barへ変更してください。実体・終値通過は安全のため確定足判定になります。
言語切替
Language / 言語でEnglishまたは日本語を選択できます。日本語へ切り替えると、チャート上の動的ラベル、ツールチップ、安全性メッセージ、セッション概要、言語連動alert()が日本語になります。
P、R1、S1、PDH、PDLなどの国際共通コードは両言語で同じ表記です。
重要な注意事項
- ピボットは数理的な参照水準であり、反転やブレイクを保証しません。
- 読み込み初日が選択ソースの日中途中から始まる場合、それ以前の到達順は復元できないため、その日だけ経路追跡を停止します。
- 1本の足内で複数水準へ触れた正確な順序はOHLCから判定できないため、同順位になります。
- 標準銘柄ソースのセッション外では、古い価格を流用せず到達判定を停止します。
- Heikin-Ashi、Renko、Kagiなどの合成足では、到達イベントを既定で停止しています。
- Live barのヒゲ到達はリアルタイム更新に反応します。再読み込み後の履歴足には最終OHLCが残り、当時のティック列そのものは残りません。
- 本インジケーターはエントリー、決済、ストップ、ロット、成績表を提供しません。 Indicador

Support & Resistance Confluence Levels, Hold Record & ReversalOVERVIEW
Four lines. Two above price, two below. That is the whole chart.
Every other support/resistance tool has the opposite problem. It finds forty levels and leaves you to work out which two matter. Forty levels is not information, it is wallpaper — and a level you have to hunt for is a level you will not trade.
So this tool inverts the design. It does not ask "where are the levels?" It asks:
WHICH LEVEL WOULD I ACTUALLY TRADE, RIGHT NOW, AND WHY SHOULD I BELIEVE IT?
A price is only promoted to a level when SEVERAL INDEPENDENT METHODS AGREE ON IT. One method finding a level proves nothing — every method finds levels everywhere. The signal is AGREEMENT.
This is a research and framing tool. It is NOT a strategy, NOT a signal service, and NOT a validated edge.
THE SIX VOICES — four propose, two confirm
PROPOSERS. Each nominates candidate prices, independently:
◆ SWING PIVOT the classic. Where price actually turned.
~ KERNEL EXTREMUM the turning point of the SMOOTHED price (Nadaraya-Watson), which is the shape
rather than the noise. This is Lo, Mamaysky and Wang's method, and it finds
structurally different levels from a raw pivot. That independence is exactly
what makes agreement between the two worth something. Agreement between two
methods that make the same mistakes is worth nothing at all.
⇈ HIGHER TIMEFRAME a swing on the HTF. The level a bigger participant is watching.
▣ PRIOR PERIOD yesterday's high and low. Last week's high and low. The most watched prices on
any chart — and missing from almost every auto-S/R script on TradingView.
CONFIRMERS. They do not nominate, they vouch:
▪ VOLUME NODE the level sits where volume actually transacted. Real business was done here,
not merely a turning point.
○ ROUND NUMBER the psychological grid.
Candidates within an ATR tolerance merge, and the merged level inherits every voice that spoke for it. A level needs MIN VOICES to exist at all. Everything below that is DISCARDED, not hidden. Then only the nearest two above and two below are drawn.
The label tells you why the level is there: "◆~▣▪ 4v held 3/4 24,247.00" — four independent voices, tested four times, held three.
AND THEN THE PART NOBODY DOES: WE TEST WHETHER CONFLUENCE ACTUALLY RANKS
"Levels are stronger when several methods agree" is one of the most repeated claims in technical analysis and almost nobody has ever checked it. It is checkable. So the panel reports:
High confluence (3+) +0.24R n=61 PROVEN
Low confluence -0.03R n=88
Control (unconditional) +0.02R n=240
DOES CONFLUENCE RANK? YES — more voices IS better
And the control is DIRECTION-MATCHED. Reversals at support are overwhelmingly LONG on a drifting index — and a long-biased event set compared against a 50/50 control is handed the drift for free and calls it an edge. Longs are compared only with control longs, shorts only with control shorts, and the control is then blended back using the events' OWN direction mix. It is a subtle trap and it will manufacture an edge out of nothing if you let it.
And the verdict is a TEST, not a comparison. High confluence is measured against low confluence with a Welch t-test, and the difference must clear |t| > 1.96 before it is allowed to be a finding. Below that, the panel prints the least satisfying answer there is — NO DIFFERENCE — because that is the honest one. A tool that reports a 0.02R gap as a verdict is not measuring anything, it is decorating.
If the extra voices do not rank on your instrument, then on your instrument they do not rank, and no amount of agreement between methods will change that. That row is the reason this script exists.
THE HOLD RECORD — and why "held 3/4" is not what most scripts mean by it
A TEST IS AN EPISODE, NOT A BAR. Price arrives at the level and the test stays OPEN until price LEAVES it — back the way it came (HELD) or straight through (BROKE). A bar that closes INSIDE the zone has resolved nothing and is counted as nothing.
Counting every touching bar as a completed test drops an entire consolidation into the denominator as failures, and manufactures hold rates near 10% that say nothing about the level and everything about the counter. An unresolved test is neither a hold nor a break, exactly as an unresolved trade is neither a win nor a loss.
AND A TEST IS AN APPROACH, NOT A BAR TOUCHING A BOX. Price exits the zone (HELD), the next bar dips straight back in — and without a re-arm rule that counts as a brand-new test. Chop sitting on a level then logs a hundred "tests" that were really one event. Measured live before this was fixed: 224 tests of a single level on a 5m chart, and hold rates that all landed between 61% and 75% no matter which level you looked at. A statistic that cannot tell any two levels apart is not measuring the levels — it is measuring the bar size. Price must now travel clear of the zone before the level can be tested again. One approach, one test.
The volume filter gates the SIGNAL and never the RECORD. A level that holds on thin volume still HELD. Quietly dropping it from the numerator while leaving it in the denominator is how a hold rate gets manufactured.
IF TWO ZONES OVERLAP, THEY ARE THE SAME LEVEL
The merge tolerance is held to at least the combined zone half-widths. Otherwise two levels a fraction of an ATR apart refuse to merge and then draw overlapping boxes anyway, and the geometry contradicts itself on the chart for anyone to see. It is a small thing that quietly tells you the tool was never looked at.
A LEVEL IS AN ANCHOR, NOT A TRAILING AVERAGE
Levels merge as new candidates arrive, and the merged price is a COUNT-WEIGHTED mean: the tenth candidate moves the level by a tenth of the gap, not half of it. This sounds like a detail. It is not. A level that moves halfway toward every new candidate will slide toward price — because price is where new candidates come from — until it is no longer an anchor at all, but a trailing average sitting in the middle of the action, "tested" on every swing. The maths here is the difference between a level and a moving average with extra steps.
Levels are retired by DISTANCE, and confluence buys REACH. A level far from price is useless however many voices it has; a level at price is what you are trading. But eviction cannot simply drop the weakest, either — every level is BORN with one voice, so a weakest-first rule kills every new level in the cradle, before it can earn a second, and the chart slowly fills with ancient far-away fossils while nothing can form where price actually is. Confluence buys a level the right to be further away. It does not buy it immortality.
THE REVERSAL TRADE — because nobody looks at a level to admire it
Price tests the level and closes back out. Entry at the CLOSE, stop beyond the level, target a fixed R multiple.
ENTRY IS THE CLOSE, for the event and for the control alike. A rejection is a SIGNAL, not a fill.
Entering at the level — a better price — while the control enters at the close hands every level a
free head start, and it would "win" without the level having done anything at all.
THE R MULTIPLE IS FIXED so that the event and the control are measured on IDENTICAL geometry. A
variable target against a fixed-target control is not a comparison: the near target is reached more
often AND resolves inside the grading horizon more often, so the two are not even being asked the
same question.
THE NEXT OPPOSING LEVEL is drawn too, and separately tested: is it reached before the stop, and HOW
FAR AWAY IS IT IN R? A hit rate with no distance attached is a fact about the distance, not about
the levels — a target half a unit of risk away being reached often proves nothing.
Signals fire only at the levels actually on screen. Every level keeps its record; only the ones you are watching can fire. You do not trade a level twelve levels away from price.
And when a level BREAKS, you are told. A level holding is the reversal; a level giving way is the other half of why anyone draws one. Breaks are marked with an x and carry their own alerts — reported as pure information, with no trade framed and no claim made, because the break is not what this engine calibrated. Saying so is cheaper than pretending otherwise.
NON-REPAINT, AND ITS HONEST COST
Pivots confirm some bars late. The kernel extremum confirms a half-window late — a centred kernel looks into the future, and we refuse to. So a level appears some bars AFTER the swing that created it. That lag is the price of not repainting and it is paid deliberately.
Levels, tests, holds, breaks, signals and every calibration event are computed on CONFIRMED bars only. The HTF read uses lookahead_off. Nothing is drawn and then moved.
DATA AND SCOPE
Any symbol, any timeframe. ATR-normalised throughout. Volume improves the score but is NOT required — without it the volume-node voice simply abstains rather than guessing.
HOW TO USE
0. Turn the KEY on once (Dashboard & theme > Show the key). It explains the six glyphs. Turn it off
again — you only need it the first time.
1. MIN VOICES is the one input that matters. 1 gives you the forty-line wallpaper every other S/R
script gives you. 2 requires agreement. 3 shows only the prices several independent methods
arrived at on their own. Raise it until the chart shows levels you would actually trade.
2. Read the hold record. "Held 3/4" tells you more than any colour ever will.
3. READ THE CONFLUENCE VERDICT BEFORE YOU WEIGHT ANY OF IT. If the voices do not rank here, a level
is a LOCATION, not a probability — treat it as context, not as a signal.
4. Wait for the rejection: price into the level, close back out, on real volume.
5. Entry, stop and target are drawn. They are arithmetic, not advice.
ALERTS
Support held · Resistance held · Any rejection · Support broke · Resistance broke
EXPORTS (Data Window — consume from other scripts via input.source())
EXP_Sup1, EXP_Sup2, EXP_Res1, EXP_Res2, EXP_SupVoices, EXP_ResVoices, EXP_Signal, EXP_Entry, EXP_Stop, EXP_Target, EXP_ConfluenceEdge
CONCEPT CREDIT
Support/resistance and polarity are long-standing public trading concepts with no single author; the written tradition runs through Charles Dow, Richard Wyckoff and Edwards & Magee.
The TRADING-RANGE BREAK — the formal S/R rule — was first tested at scale by William Brock, Josef Lakonishok and Blake LeBaron, "Simple Technical Trading Rules and the Stochastic Properties of Stock Returns", Journal of Finance 47(5), 1992. Their findings were later shown to be vulnerable to data-snooping (Sullivan, Timmermann and White, 1999) — which is precisely why this tool MEASURES the rule on your instrument instead of asserting it.
Nonparametric kernel regression for level detection is from Andrew W. Lo, Harry Mamaysky and Jiang Wang, Journal of Finance 55(4), 2000; the Nadaraya-Watson estimator is due to Nadaraya and Watson (1964). ATR — J. Welles Wilder. Triple-barrier forward labelling — Marcos Lopez de Prado. Welch's t-test — B. L. Welch.
The confluence gate, the voice model, the episode-based hold record, the confluence-ranking test and the direction-matched control are the author's own. Clean-room implementation; no third-party Pine code is reused. Not affiliated with, nor endorsed by, any of the above.
HONESTY AND LIMITATIONS
Calibration is IN-SAMPLE, with no costs or slippage, and uses overlapping windows. A proven in-sample edge is NOT a guarantee out-of-sample. Real fills, spreads and commissions will reduce it.
The confluence gate is one rule among many — a different tolerance gives different levels.
Confluence is TESTED here, not assumed. If the panel says the extra voices do not rank, then on this instrument they do not, and no amount of agreement between methods will change that.
Both barriers on one bar: the STOP is assumed first — conservative, and the only assumption that cannot flatter the result. Unresolved trades at the horizon are marked to market, not booked as losses. Nothing is marked PROVEN below t = 1.96, and nothing is rated at all below the minimum sample.
Nothing in this script predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Entry, stop and target output is arithmetic, not advice. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use. Indicador

RSI Levels & Regime Map Heatmap & Cardwell Reversal SignalsOVERVIEW
RSI is the most-used oscillator in the world, and almost nobody trades it — because "RSI is 62" is not something you can place an order against.
This tool moves RSI onto price.
RSI IS INVERTIBLE. Wilder's smoothing can be solved backwards, so for any RSI value there is an EXACT price that would produce it on the next bar. Instead of "RSI is 62", the chart tells you:
Close above 24,278 -> RSI 70 (resistance)
Close below 24,193 -> RSI 30 (support)
Those are real levels. You can put a stop there. You can put a target there.
The script draws the full ladder (30 / 40 / 50 / 60 / 70, all configurable), shades the bands between them into a regime heatmap, measures the Cardwell range regime, marks Cardwell positive and negative reversals with projected targets, shows a multi-timeframe strip — and then does the thing nobody else does: IT FORWARD-TESTS WHETHER ANY OF IT ACTUALLY HOLDS.
This is a research and framing tool. It is NOT a strategy, NOT a signal service, and NOT a validated edge.
THE MATHS (exact, not an approximation)
RSI = 100 - 100/(1 + AG/AL), where AG and AL are the Wilder-smoothed average gain and loss.
For a target T, let RSt = T/(100 - T). Solving the next bar's RSI for the move x required:
an UP move needs x = (n-1) * (RSt*AL - AG)
a DOWN move needs x = (n-1) * (AL - AG/RSt)
Level = close + x. The up form applies when it is non-negative; otherwise the down form does.
This is algebra, not curve fitting. Feed the derived price back through RSI and you get the target value back exactly. The levels are not estimates — they are the precise prices at which the RSI state changes, recomputed every bar. The ladder breathes with volatility on its own: it tightens in quiet markets and widens in violent ones, with no smoothing parameter to tune.
WHY THESE PARTS ARE ONE TOOL (mashup rationale)
1. THE INVERSE-RSI LADDER — the core. Every rung is the exact price at which RSI would print a chosen value.
2. THE HEATMAP — the bands between the rungs, shaded by regime. It shows at a glance how far price must travel to change the RSI story, which is the one question the oscillator pane can never answer.
3. THE CARDWELL REGIME — Andrew Cardwell's observation: in a BULL market RSI holds roughly 40-80, and 40 becomes SUPPORT. In a BEAR market it holds 20-60, and 60 becomes RESISTANCE. So "RSI 40" means the OPPOSITE thing in the two regimes. A tool that ignores this will cheerfully tell you to buy oversold all the way down a trend. The regime here is MEASURED over a lookback, not assumed — and the rung the script watches follows the regime rather than a fixed number.
4. CARDWELL REVERSALS — the signal almost nobody implements. A POSITIVE REVERSAL is RSI making a LOWER low while PRICE makes a HIGHER low. That is the mirror image of classic divergence, and it is a CONTINUATION signal, not a trend reversal. A NEGATIVE REVERSAL is the bearish mirror. A measured target is projected from each.
5. THE HONESTY LAYER — everyone says RSI 30 is support. Nobody checks. Every level test and every Cardwell reversal is logged and graded with a triple barrier against an unconditional control.
Remove any one and you are left with a prettier RSI that still cannot tell you whether RSI works.
THE CALIBRATION — AND THE TWO TRAPS IT TOOK A LIVE TEST TO FIND
Two subtle biases can make a level tool look brilliant while it is doing nothing at all. Both are handled explicitly here, and both are worth understanding whichever tool you use.
TRAP 1 — THE FILL ADVANTAGE.
A support test fires when price dips INTO the rung and closes back ABOVE it. If you enter the event AT THE RUNG (below the close) but compare it with a control entered at the CLOSE, the event gets a strictly better fill on EVERY trade. It then "beats" the control by construction — not because the level held, but because it bought lower. That is a rigged comparison, and it produces a large fake edge.
THE FIX: the level test is treated as a SIGNAL, NOT A FILL. The event and the control enter at the SAME reference price — the bar's close. The only thing that differs is which bars were selected.
TRAP 2 — DIRECTIONAL DRIFT.
Indices drift upward. If level tests are mostly LONG while the control is 50/50, the events win on drift alone and prove nothing.
THE FIX: longs are compared only with control longs, shorts only with control shorts, then blended back using the events' OWN direction mix. The panel also reports the baseline drift directly, so you can see whether the instrument is simply going up.
The control is UNCONDITIONAL: the same trade geometry taken on arbitrary bars, selected by no signal at all. If the levels cannot beat that, they carry no edge.
Results are reported as EXPECTANCY IN R, not hit rate. A Welch t-test decides whether the difference is real or luck — the panel does not say PROVEN unless t > 1.96.
Other conventions, all chosen so the tool cannot flatter itself:
· Both barriers touched on one bar -> the STOP is assumed first.
· Expired trades are marked to market, not booked as losses.
· The level tested is the one computed at the END OF THE PREVIOUS BAR — the price a trader could actually have rested an order at. Using the current bar's own level would be a look-ahead.
· Everything is logged and resolved on confirmed bars only.
HOW TO USE IT
1. READ THE REGIME FIRST. In a bull regime the 40 rung is support and you are hunting long tests of it. In a bear regime the 60 rung is resistance. In neutral, the ladder is simply a map.
2. The rungs are LEVELS. Price closing through one changes the RSI state, by definition.
3. A CARDWELL REVERSAL is a continuation signal with a projected target.
4. READ THE CALIBRATION BEFORE YOU WEIGHT ANY OF IT — and read the baseline-drift row next to it. If level tests show no proven edge on your instrument, the ladder is a MAP, not a probability.
5. Entry, stop and target are drawn at the same price the calibration measures. They are arithmetic, not advice.
DATA / SCOPE
Any symbol, any timeframe. No volume required. The source is an input, so the ladder can be built from close, hlc3, or even another indicator's plot.
NON-REPAINTING
The ladder is computed from confirmed values and projects FORWARD — it is a statement about what the NEXT bar would need to do, so it necessarily moves as new bars arrive. That is a projection, not a repaint, and it is stated plainly rather than hidden.
Level tests are evaluated against the PREVIOUS bar's level, so no future information is used. Reversal pivots use ta.pivot* and confirm a few bars after the fact; once printed, they do not move. The calibration harness logs AND resolves on confirmed bars only, so its statistics cannot inflate intrabar.
HONEST LIMITATIONS — PLEASE READ
The ALGEBRA is exact. THE CLAIMS ABOUT RSI ARE NOT.
"RSI 30 is support" is folklore until it is measured, which is exactly why this script measures it — and why it is built to be able to return "not proven".
Calibration figures are IN-SAMPLE, with no costs or slippage, and use overlapping windows. A proven in-sample edge is NOT a guarantee out-of-sample. Real fills, spreads and commissions will all reduce it.
Cardwell's rules are discretionary in origin and are mechanised here in one particular way. A different mechanisation would give different numbers.
Small samples are unreliable even when they look good. If the edge is near zero, negative, or unstable across timeframes, the honest conclusion is that it is not there.
Nothing here predicts price.
CONCEPT CREDITS
Relative Strength Index and its Wilder smoothing — J. Welles Wilder Jr.
Range rules, positive and negative reversals, and the measured-move projection — Andrew Cardwell.
Triple-barrier forward labelling — Marcos López de Prado.
Welch's t-test — B. L. Welch.
The inverse-RSI level engine, the regime map, the unconditional direction-matched control and the significance testing are the author's own. Clean-room implementation; no third-party code is reused. Not affiliated with, nor endorsed by, any of the above.
DISCLAIMER
Research and educational tool only. NOT financial advice, NOT a recommendation, and NO guarantee of results. Indicators describe past behaviour; they do not predict the future. Entry, stop and target output is arithmetic, not advice. Trading carries a risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicador

Dashboard Pro | RSI - Fib - S/R - VolumeOverview
MTF Dashboard Pro is a multi-timeframe confluence engine that scans four timeframes simultaneously — 15-minute, 1-hour, 4-hour, and daily — and evaluates four independent technical conditions on each one. When all conditions align in the same direction, the dashboard issues a high-conviction LONG or SHORT signal. Everything is displayed inside a professional color-coded table directly on your chart, with optional S/R lines and a projected Golden Zone overlay.
What makes this different
Most multi-timeframe dashboards simply display RSI or MACD values across timeframes and leave interpretation to you. This indicator goes further: it defines explicit bullish and bearish conditions for each metric, scores them per timeframe, and only triggers a signal when a configurable number of conditions agree. The result is a systematic, rules-based directional bias — not a subjective reading of scattered numbers.
The four conditions
Each timeframe is scored on these four independent tests:
1 — RSI Momentum (Default: 14-period)
RSI above 50 registers as bullish. RSI below 50 registers as bearish. This captures the underlying momentum direction without relying on overbought/oversold extremes, which lag in trending markets.
🟢 Bullish: RSI > 50
🔴 Bearish: RSI < 50
2 — Fibonacci Golden Zone (0.618 – 0.786)
Calculated from the highest high and lowest low of the last N candles (default: 20 bars). The Golden Zone sits between the 0.618 and 0.786 Fibonacci retracement levels of that range. Price position relative to this zone determines the condition:
🟢 Bullish: Price at or above the 0.618 level (inside or above the Golden Zone)
🔴 Bearish: Price below the 0.618 level (rejected from the zone)
The Golden Zone is drawn on the chart as a projected box extending 20 bars to the right of the current candle, with dashed borders at 0.618 and 0.786, and a dotted midline at 0.702.
3 — Support / Resistance Positioning
Strong Support is the lowest low of the lookback period. Strong Resistance is the highest high. The midpoint between them defines the range center.
🟢 Bullish: Price above the midpoint (upper half of range — strength)
🔴 Bearish: Price below the midpoint (lower half of range — weakness)
Support and Resistance lines are drawn on the chart starting from the exact candle where the high or low occurred, extending to the right of the current bar. A subtle zone band (ATR-based) highlights each level as a zone rather than a single line.
4 — Volume Confirmation (USDT-denominated)
Volume is calculated as volume × close to approximate USDT-denominated volume. This is compared against a simple moving average (default: 20 periods).
🟢 Confirmed: Current volume above the average
🔴 Not confirmed: Current volume below the average
Volume confirmation applies equally to both LONG and SHORT signals — high volume validates the move regardless of direction.
Signal logic
For each timeframe, the indicator counts how many of the four conditions are bullish and how many are bearish.
LONG ▲ — Triggered when the bullish count reaches the minimum threshold (default: 4 out of 4)
SHORT ▼ — Triggered when the bearish count reaches the minimum threshold
NEUTRAL — Mixed conditions, no clear directional consensus
You can lower the threshold to 3 for more frequent signals with slightly less conviction, or keep it at 4 for maximum confluence.
Dashboard table
The on-chart table displays 13 rows across 5 columns (one label column + four timeframe columns):
Row 1 — RSI value with color-coded background (green > 50, red < 50)
Row 2 — Golden Zone status: ABOVE, IN ZONE, or BELOW
Row 3 — Golden Zone price range (0.618 and 0.786 levels)
Row 4 — Strong Support price (green text)
Row 5 — Strong Resistance price (red text)
Row 6 — S/R Position: BULLISH or BEARISH
Row 7 — Volume USDT with formatted K/M/B suffix
Row 8 — Individual condition checklist (✓ or ✗ for each of the 4 conditions)
Row 9 — Score (e.g. "4/4 BULL" or "3/4 BEAR")
Row 10 — Final signal: LONG ▲ / SHORT ▼ / NEUTRAL
Every data cell is background-colored to show its directional bias at a glance. Hover over any label cell to see a tooltip explaining the logic.
Chart overlay
Strong Support and Strong Resistance are drawn as horizontal lines originating from the exact candle where the extreme price occurred within the lookback period. Each line includes a subtle zone band for visual clarity and price labels at the right edge.
The Golden Zone is projected as a filled box extending 20 bars to the right of the current candle. The box includes dashed borders at 0.618 and 0.786, a dotted midline at 0.702, and a centered "GOLDEN ZONE" label.
You can choose which timeframe's levels to display on the chart — Current, 15M, 1H, 4H, or Daily. When plotting a higher timeframe on a lower timeframe chart, bar offsets are automatically scaled to the correct chart positions.
Settings
Table Display
— Position: 9 options (Top/Middle/Bottom × Left/Center/Right)
— Text Size: Tiny, Small, Normal, Large
Indicator Settings
— RSI Period: Default 14 (range 2–100)
— S/R and Golden Zone Lookback: Default 20 bars (range 5–500)
— Volume SMA Period: Default 20 (range 2–200)
Signal Logic
— Minimum Conditions: Default 4 (range 1–4). Controls how many conditions must agree for a signal.
Chart Lines
— Show/Hide toggle for all chart drawings
— Timeframe selection for plotted levels
— Individual color pickers for Support, Resistance, and Golden Zone
— Line width and style (Solid, Dashed, Dotted)
— Show/Hide price labels
— Golden Zone fill toggle and transparency control
Alerts
10 pre-configured alert conditions:
— LONG and SHORT alerts for each individual timeframe (8 alerts)
— "Any TF LONG" — fires when at least one timeframe triggers LONG
— "Any TF SHORT" — fires when at least one timeframe triggers SHORT
Set these up in TradingView's alert dialog to receive notifications when signals change.
Best practices
— Use this as a confluence filter alongside your own price action analysis, not as a standalone entry signal.
— When multiple timeframes show the same signal simultaneously, conviction is significantly higher than a single-timeframe signal.
— For crypto pairs, the Volume USDT calculation is most accurate. For forex and equities, the volume column still shows relative volume strength but does not represent actual USDT value.
— The 20-bar lookback on a 15-minute chart covers roughly 5 hours. On a daily chart, it covers 20 trading days. Keep this asymmetry in mind when comparing timeframe signals.
— Start with the default threshold of 4/4 to learn the indicator's behavior before experimenting with lower thresholds.
Disclaimer
This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice, and past performance does not guarantee future results. Always use proper risk management. Never risk capital you cannot afford to lose. The signals generated are mathematical calculations based on historical price and volume data and should be used as one component of a broader, well-tested trading strategy. Indicador
