OPEN-SOURCE SCRIPT
Güncellendi

Time-at-Price S/R Pockets

331
A support/resistance tool built on a different principle than volume profile: instead of weighting by volume, it weights by time spent — how many bars price has hugged each price region — then renders that as horizontal pockets floating beside price. Length and colour intensity show relative strength; colour shows direction (red = overhead, teal = underneath); an optional higher-timeframe layer ghosts in the larger structure behind the current chart.
How the profile is built
The lookback window is split into horizontal bins. Every bar votes for every bin its high–low range touches. Votes can optionally decay with age (a half-life input, with a floor so old zones don't vanish entirely) and can optionally be weighted by volume. Adjacent bins above a strength threshold are merged into a single pocket, splitting at "shoulders" so one broad consolidation renders as several distinct zones around their local peaks rather than one giant slab.
What each pocket tells you

Strength % — this zone's weight relative to the strongest zone in the window.
Bias — which side won more bars while price was inside the zone (buyers/sellers/balanced). This is what lets you tell a passive shelf from an actively defended one.
🔥 hot — a large share of the zone's weight came from recent bars, i.e. it's being tested right now.
Dashed ghost pockets — the same profile computed on a higher timeframe (default Weekly) via its own true bar history, shown behind the main pockets so you can see intraday structure sitting inside (or clashing with) the bigger picture.

Momentum tools
A pressure gauge compares current RSI displacement against the strength of the zone price is climbing out of, sinking through, or approaching — e.g. "pushing at 0.3x the strength of the 100% zone below" means momentum is currently weak relative to the level in its path.
Projection line — please read this part
There is an optional dotted projection line generated from a simple difference equation: linear-regression drift (fading each step) + reversion toward the profile's point of control + drag while crossing strong zones. This is a toy, not a forecast. It has not been validated against outcomes, carries no statistical claim, and should be treated as a visual aid for seeing where current momentum and structure point under a fixed set of hand-picked parameters — nothing more. Turn it off in the settings if you'd rather not see it.
Notes

All percentages are normalised to the strongest zone in that window — they are not comparable across timeframes or lookback settings.
This is a lagging, descriptive tool: it summarises where price has spent time, not where it's obligated to go next.
Fully configurable: lookback, bin count, decay, merge/shoulder-split sensitivity, momentum window, and HTF timeframe are all inputs.

Not financial advice. Test on your own instruments and timeframes before relying on it.
Sürüm Notları
updated to move the RSI text to the left of the boxes as this was overlapping candles and making it difficult to see the most recent price
Sürüm Notları
Added default option selection for each timeframe, reducing the number of manual selections required to tune
Sürüm Notları
v9 — Value Migration Trail
New

Rolling Point-of-Control trail — a stepped line tracking where the point of control has sat over time, so you can see value shift rather than just its current resting place.
Value area band (VAH/VAL) — the price range containing the central 70% (adjustable) of the distribution, shaded and updated continuously.
Drift readout — how far value has moved over your lookback, measured in ATR so it's comparable across instruments and timeframes. Classified as migrating up / down / balanced.
Overlap readout — how much the current value area overlaps the previous one. High overlap = the market is accepting the same prices (balance). Low overlap = value is stepping (trending).

Why
Earlier versions showed where time/volume has concentrated but nothing about which way that structure has been moving. This closes that gap using the same construction (bins, decay, smoothing) as the existing Point-of-Control line, so the trail's current end matches it exactly by default.
Notes

Migration is descriptive and backward-looking — a statement about what's already happened, not a forecast. The projection's self-score readout is unaffected and still governs how much to trust the forward-looking line.
The PoC trail steps rather than curves by design — a point of control is a mode, and smoothing it would misrepresent a genuinely discontinuous quantity.
New "Value migration" input group: trail on/off, migration window (0 = match display lookback), recompute stride, trail length, value-area %, drift/overlap thresholds, and HUD position.
If TradingView reports the script is too slow, raise "Recompute every N bars" — this coarsens the trail without moving its endpoint.
Sürüm Notları
v9.1 — Fix: value-area overlap was ~100% by construction
Fixed

The overlap readout previously compared each value area against the one from the previous recompute (default: 5 bars earlier). On long migration windows, adding a handful of bars barely changes the distribution, so overlap read ~100% regardless of market condition — it was measuring recompute granularity, not auction behaviour.
Overlap now compares the current value area against the value area from N bars ago (N = the "Drift lookback" input, default 50) — the same horizon the drift metric uses. It now answers the question session profiles answer: does value accepted now overlap value accepted then?

Changed

The migration HUD states the comparison window explicitly, e.g. "areas STEPPING — trending (34% overlap vs 50 bars ago)", so the number can't be misread.
Drift and overlap now share one horizon, so the two lines of the migration HUD are directly comparable readings of the same question.

Notes

Expect overlap readings to be meaningfully lower (and actually informative) after this update — the near-constant 100% in v9.0 was the bug, not your market.
With "Migration window" at its default (matching the display lookback), the value area is deliberately slow; shorten it (~100 bars) if you want the overlap metric to respond at session-profile speed.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.