OPEN-SOURCE SCRIPT
Momentum RSI For Loop | NAL

1. Overview
Momentum RSI For Loop | NAL is a momentum-regime indicator built around a Jurik-smoothed double RSI engine. It first smooths price using a Jurik-style moving average, then applies RSI twice to measure both momentum and momentum-of-momentum.
Instead of using a fixed RSI threshold, the indicator compares the current smoothed double RSI against many of its previous values. This creates a loop counter that shows whether current momentum is stronger or weaker than a broad section of recent history.
2. Calculation
The indicator starts by smoothing the selected source with a Jurik-style moving average. This creates a cleaner input before RSI is calculated, helping reduce noise while keeping the response relatively fast.
The first RSI measures the momentum of the smoothed source. The second RSI is then applied to the first RSI, creating a double RSI structure. This second layer measures whether the original RSI itself is strengthening or weakening.
After the double RSI is calculated, it is smoothed again using the same Jurik-style smoothing method. This produces the final momentum series used by the loop engine.
The loop mechanism then compares the current smoothed double RSI value against past values over the selected range. If the current value is greater than the value from i bars ago, the counter adds one point. If it is not greater, the counter subtracts one point.
A high positive counter means current momentum is stronger than many previous momentum readings. A deeply negative counter means current momentum is weaker than many previous readings.
The final signal is based on two thresholds. A bullish state triggers when the loop counter rises above the upper threshold. A bearish state triggers when the loop counter falls below the lower threshold.
3. Key Features
4. Use
Works well in getting out around tops and bottoms, during trending periods. Best used in confluence with other indicators, due to it's unique behaviour, and it being prone to false signals in regimes where other indicators are not.
The indicator is best used as a momentum-regime tool. It can help confirm trend continuation, detect momentum shifts, and visually separate bullish and bearish conditions through candle coloring and transition labels.
Momentum RSI For Loop | NAL is a momentum-regime indicator built around a Jurik-smoothed double RSI engine. It first smooths price using a Jurik-style moving average, then applies RSI twice to measure both momentum and momentum-of-momentum.
Instead of using a fixed RSI threshold, the indicator compares the current smoothed double RSI against many of its previous values. This creates a loop counter that shows whether current momentum is stronger or weaker than a broad section of recent history.
2. Calculation
The indicator starts by smoothing the selected source with a Jurik-style moving average. This creates a cleaner input before RSI is calculated, helping reduce noise while keeping the response relatively fast.
The first RSI measures the momentum of the smoothed source. The second RSI is then applied to the first RSI, creating a double RSI structure. This second layer measures whether the original RSI itself is strengthening or weakening.
After the double RSI is calculated, it is smoothed again using the same Jurik-style smoothing method. This produces the final momentum series used by the loop engine.
The loop mechanism then compares the current smoothed double RSI value against past values over the selected range. If the current value is greater than the value from i bars ago, the counter adds one point. If it is not greater, the counter subtracts one point.
A high positive counter means current momentum is stronger than many previous momentum readings. A deeply negative counter means current momentum is weaker than many previous readings.
The final signal is based on two thresholds. A bullish state triggers when the loop counter rises above the upper threshold. A bearish state triggers when the loop counter falls below the lower threshold.
3. Key Features
- Jurik-smoothed double RSI momentum engine.
- For-loop comparison against historical momentum values.
- Measures relative momentum strength instead of relying on static RSI levels.
- Upper and lower loop thresholds for bullish and bearish regime detection.
- Glow-style loop plot, threshold fills, candle coloring, and transition labels.
4. Use
Works well in getting out around tops and bottoms, during trending periods. Best used in confluence with other indicators, due to it's unique behaviour, and it being prone to false signals in regimes where other indicators are not.
The indicator is best used as a momentum-regime tool. It can help confirm trend continuation, detect momentum shifts, and visually separate bullish and bearish conditions through candle coloring and transition labels.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.