OPEN-SOURCE SCRIPT
Percentile Adaptive RSI | NAL

What if RSI thresholds adapted to the market's own momentum distribution, rather than remaining fixed at arbitrary levels?
Percentile Adaptive RSI is a statistically adaptive momentum framework that combines two distinct RSI measurements with dynamically estimated percentile thresholds.
Traditional RSI interpretation relies heavily on fixed reference levels, typically 30 and 70, regardless of how an asset's momentum distribution changes over time.
This model takes a different approach.
Instead of assuming that the same RSI values should carry identical significance across different market environments, it continuously evaluates momentum relative to its own recent statistical distribution.
A second RSI, calculated from a rolling price-percentile series, introduces an additional layer of momentum confirmation.
The result is a dual-RSI consensus model in which directional classifications depend on both momentum agreement and statistically adaptive thresholds.
1. Price Percentile Transformation
The first component constructs a rolling percentile estimate of the underlying price series.
Rather than directly smoothing price through a conventional moving average, the model identifies a specified quantile within the most recent observations.
Pine Script®
At the default 50th percentile, this produces a rolling median of the selected source.
The percentile parameter can be adjusted to examine different portions of the local price distribution.
This transformed price series becomes the input to a second RSI calculation.
2. Dual-RSI Momentum Structure
The framework calculates two complementary momentum measurements:
Pine Script®
The distinction is important.
The standard RSI responds directly to changes in the source, while the percentile-based RSI evaluates changes in a distribution-derived representation of price.
Comparing both measurements introduces a confirmation requirement between direct price momentum and percentile-transformed momentum.
3. Adaptive Percentile Thresholds
Conventional RSI indicators generally rely on fixed horizontal reference levels.
Percentile Adaptive RSI instead calculates its directional boundaries from the recent distribution of the standard RSI itself.
Pine Script®
These boundaries evolve as the RSI distribution changes.
For example, an upper percentile setting of 60 represents the 60th percentile of recent RSI observations, not a fixed RSI value of 60.
This allows the model to evaluate momentum relative to its recent behavior rather than relying on universal numerical levels.
4. Directional Consensus
The final directional state requires agreement between both RSI measurements.
Pine Script®
When the two components disagree or remain between the required thresholds, the model preserves its previously established directional classification.
This persistence mechanism separates isolated threshold fluctuations from changes that satisfy the complete dual-RSI condition.
Visuals & Interpretation
The oscillator provides a streamlined representation of the prevailing momentum regime.
During qualifying bullish conditions, the displayed series selects the higher of the two RSI measurements. During qualifying bearish conditions, it selects the lower measurement. When neither condition is satisfied, the plotted value remains at its previous level.
The visualization includes:
Practical Application
Percentile Adaptive RSI is designed to analyze relative momentum strength, distribution-adjusted directional conditions, and agreement between two representations of price momentum.
Its central distinction is that momentum is not evaluated against an unchanging numerical standard.
Instead, the indicator continuously asks:
Is current momentum sufficiently strong or weak relative to its recent distribution, and does that assessment remain consistent after transforming price through a rolling percentile filter?
By combining distribution-aware thresholds with dual-RSI confirmation, the model provides an alternative to conventional fixed-threshold RSI interpretation.
Automated Alerts
Two built-in alerts monitor directional state transitions:
Both alerts require confirmation of the completed bar and activate only when the directional state changes.
Configuration
Users can independently configure the source, RSI observation length, price percentile, upper and lower RSI percentile thresholds, and visual color scheme.
Percentile Adaptive RSI is a statistically adaptive momentum framework that combines two distinct RSI measurements with dynamically estimated percentile thresholds.
Traditional RSI interpretation relies heavily on fixed reference levels, typically 30 and 70, regardless of how an asset's momentum distribution changes over time.
This model takes a different approach.
Instead of assuming that the same RSI values should carry identical significance across different market environments, it continuously evaluates momentum relative to its own recent statistical distribution.
A second RSI, calculated from a rolling price-percentile series, introduces an additional layer of momentum confirmation.
The result is a dual-RSI consensus model in which directional classifications depend on both momentum agreement and statistically adaptive thresholds.
1. Price Percentile Transformation
The first component constructs a rolling percentile estimate of the underlying price series.
Rather than directly smoothing price through a conventional moving average, the model identifies a specified quantile within the most recent observations.
At the default 50th percentile, this produces a rolling median of the selected source.
The percentile parameter can be adjusted to examine different portions of the local price distribution.
This transformed price series becomes the input to a second RSI calculation.
2. Dual-RSI Momentum Structure
The framework calculates two complementary momentum measurements:
- Standard RSI — measures conventional momentum directly from the selected price source.
- Percentile RSI — measures momentum in the rolling percentile-transformed price series.
The distinction is important.
The standard RSI responds directly to changes in the source, while the percentile-based RSI evaluates changes in a distribution-derived representation of price.
Comparing both measurements introduces a confirmation requirement between direct price momentum and percentile-transformed momentum.
3. Adaptive Percentile Thresholds
Conventional RSI indicators generally rely on fixed horizontal reference levels.
Percentile Adaptive RSI instead calculates its directional boundaries from the recent distribution of the standard RSI itself.
These boundaries evolve as the RSI distribution changes.
- Upper Percentile — defines the statistical boundary for elevated momentum.
- Lower Percentile — defines the statistical boundary for subdued momentum.
For example, an upper percentile setting of 60 represents the 60th percentile of recent RSI observations, not a fixed RSI value of 60.
This allows the model to evaluate momentum relative to its recent behavior rather than relying on universal numerical levels.
4. Directional Consensus
The final directional state requires agreement between both RSI measurements.
- Bullish — both momentum measurements exceed the adaptive upper threshold.
- Bearish — both momentum measurements fall below the adaptive lower threshold.
- Transition / Disagreement — the requirements for a new directional state are not satisfied.
When the two components disagree or remain between the required thresholds, the model preserves its previously established directional classification.
This persistence mechanism separates isolated threshold fluctuations from changes that satisfy the complete dual-RSI condition.
Visuals & Interpretation
The oscillator provides a streamlined representation of the prevailing momentum regime.
During qualifying bullish conditions, the displayed series selects the higher of the two RSI measurements. During qualifying bearish conditions, it selects the lower measurement. When neither condition is satisfied, the plotted value remains at its previous level.
The visualization includes:
- A dynamically colored momentum oscillator.
- Adaptive upper and lower percentile boundaries.
- Directional gradient fills extending toward the opposing percentile boundary.
- Persistent bullish and bearish regime coloration.
- Trend-colored candles on the main chart.
- Three color presets: Standard, Nordic, and Simple.
Practical Application
Percentile Adaptive RSI is designed to analyze relative momentum strength, distribution-adjusted directional conditions, and agreement between two representations of price momentum.
Its central distinction is that momentum is not evaluated against an unchanging numerical standard.
Instead, the indicator continuously asks:
Is current momentum sufficiently strong or weak relative to its recent distribution, and does that assessment remain consistent after transforming price through a rolling percentile filter?
By combining distribution-aware thresholds with dual-RSI confirmation, the model provides an alternative to conventional fixed-threshold RSI interpretation.
Automated Alerts
Two built-in alerts monitor directional state transitions:
- Bullish Transition — triggers when the model enters a bullish regime.
- Bearish Transition — triggers when the model enters a bearish regime.
Both alerts require confirmation of the completed bar and activate only when the directional state changes.
Configuration
Users can independently configure the source, RSI observation length, price percentile, upper and lower RSI percentile thresholds, and visual color scheme.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔵 Access our best trading & investing tools, get a 30-day free trial today: whop.com/nordic-alpha-lab/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔵 Access our best trading & investing tools, get a 30-day free trial today: whop.com/nordic-alpha-lab/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.