OPEN-SOURCE SCRIPT

Range Migration Persistence Map [Pineify]

1 491
Range Migration Persistence Map [Pineify]

Overview
This range migration indicator separates window removal from new-bar arrival. Range rails frame a center ribbon encoding remembered, close-supported migration. Purple strips expose expired extremes.

Problem Definition
A rolling channel can rise because a new high arrives or an old low disappears. Its center can move without fresh upward acceptance; interpreting each rise as buying pressure confuses sample replacement with price behavior. An unchanged boundary can conceal an old extreme exiting and a new bar replacing it. Attribution must preserve both causes, including cancellation.

Design Rationale
Removing the oldest bar before adding the current bar gives an exact accounting identity; reversing that order would allocate simultaneous replacement differently. Prior ATR excludes the current shock from the price scale. Closing beyond the previous boundary weights arrival evidence, reducing wick-only migration. Bounded impulses enter separate direction and activity memories. Hysteresis and consecutive closes reduce phase chatter but delay entry and release.

Key Features
The overlay includes high-low rails, a center persistence halo, survivor tracks and expiry strips. Optional boundary cause dots and phase markers explain changes. A dashboard separates confirmed attribution from current candidates; the Data Window exposes the reconstruction residual.

How It Works
For N bars, the previous range uses bars 1..N, survivors 1..N-1, and the updated range 0..N-1. Removal is survivor minus previous; arrival is updated minus survivor, for each boundary. Half the sum of upper and lower changes gives each center contribution. Removal plus arrival reconstructs total center movement; all are divided by prior ATR.
Upward arrival is weighted by the close's distance above the previous upper boundary divided by the new extension beyond it, clipped to 0..1. Downward arrival uses the mirrored rule. Half the weighted signed arrival sum gives accepted movement; closing within the old range contributes zero.
Accepted movement x becomes x/(1+abs(x)). With weight 2/(memory length+1), signed and absolute impulses enter separate zero-seeded decays. Coherence is absolute signed memory divided by absolute memory. Direction requires the entry level and coherence gate; an existing phase uses weaker release gates. A different candidate must persist for the configured number of closes.
All N+1 OHLC samples must be present and internally consistent; prior ATR must be positive. Newest ties define extreme ages. Invalid coverage clears memory and plots at close; recovery starts from zero.

How Multiple Indicators Work Together
Range accounting identifies the cause before close location can qualify arrival. ATR makes accepted price movement comparable across local scales. Signed memory retains direction while absolute memory reveals cancellation, so coherence cannot be inferred from a slope alone. Removing attribution would admit expiry effects; removing close weighting would admit wick excursions; removing magnitude memory would hide opposing accepted arrivals.

Trading Ideas and Insights
A rising center with purple lower-boundary expiry can be mechanical. Repeated close-supported arrivals offer context for examining migration, not an entry instruction. Compare phase, removal and arrival columns before judging a shift. Expiry contraction alerts report window arithmetic, not future volatility or breakouts.

Unique Aspects
Relative to a plain rolling channel, the contribution is an ordered, reconstructable removal/arrival decomposition feeding a separate acceptance memory. Mixed replacement remains visible even when net boundary change is zero. Only arrival qualified against the previous range enters persistence; expiry moves remain diagnostic. Coherence and amplitude jointly control a delayed state, rather than renaming channel slope as trend strength.

How to Use
Use standard OHLC charts, starting with a 24-bar range and 14-bar ATR. Wait for full coverage. Teal means confirmed upward acceptance, coral downward, and theme-aware neutral neither. Purple strips measure removal gaps. Triangles mark phase entries; gold circles mark release. Choose alerts once per bar close.

Customization
Range length changes surviving extremes; ATR length changes normalization. Memory sets decay, entry sets amplitude, coherence gates agreement, and the release ratio sets hysteresis. Confirmation adds delay; the expiry threshold gates contraction alerts. Halo scale changes only memory's visual width. Expiry layers, halo, cause dots, transitions and table have independent switches. Defaults are starting points.

Assumptions and Limitations
OHLC close location is an acceptance proxy, not traded-volume distribution or proof of demand. ATR lags, gaps can dominate arrival, and results depend on window and threshold choices. Full coverage includes the departing bar; zero ATR blocks output. Current candidates change intrabar while rails, memory, phase and alerts hold confirmed values. Feed revisions and parameter changes can alter history. The halo is a constructed memory width, not a support zone, probability or confidence interval. This script does not estimate execution, returns or future direction.

Conclusion
Use this range migration persistence map to separate sample expiry from close-supported arrival. Accounting, memory and phase describe distinct aspects of each channel update.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.