OPEN-SOURCE SCRIPT
Parsifal.RSI.Trend

Context
The Relative Strength Index (RSI) is one of the most widely used classical indicators in technical analysis, typically employed to identify overbought or oversold market conditions. It reflects the degree of upside or downside dominance within a specified period. However, in its standard form, RSI is not particularly effective as a standalone entry trigger.
The Parsifal.RSI.Trend indicator builds upon the RSI to offer a more reliable method for distinguishing between bullish and bearish market regimes. It is a very simple, but surprisingly efficient concept.
________________________________________
Concept
In trending markets, an Exponential Moving Average (EMA) of the price is often smoother and more stable than raw price data. As a result, the RSI calculated on this smoothed price (i.e., the EMA) tends to react earlier and more consistently than the standard RSI. Specifically:
• In uptrends, the RSI of the EMA tends to exceed the RSI of the original price.
• In downtrends, it tends to lag behind.
The difference between these two RSI readings provides a stable and less noisy measure of market bias—positive in uptrends, negative in downtrends.
________________________________________
Indicator Mechanics
The RSI.Trend indicator works as follows:
• Baseline:
o 14-period RSI of the original price (RSI)
o 14-period EMA of that RSI (RSI.EMA)
• Trigger Line:
o 5-period EMA of the price series
o 14-period RSI on that smoothed price (RSI5M)
o 14-period EMA of RSI5M (RSI5M.EMA)
• The difference between the trigger line and the baseline reflects the current trend regime:
o A crossover of the trigger line above the baseline indicates a shift to a bullish regime.
o A crossunder signals a transition to a bearish regime.
________________________________________
RSI.Trend Background Value
The RSI.Trend Flow Background enhances this difference by incorporating recent changes in the trend state. This produces a slightly accelerated signal and visually shades the background:
• > 0 (Green background): Bullish regime
• < 0 (Red background): Bearish regime
________________________________________
How to Use RSI.Trend
• Use crossovers and crossunders between the trigger line and the baseline as entry signals or confirmation of regime shifts.
• The background value can serve as:
o A secondary confirmation signal
o A position sizing multiplier for continuous trading, adjusting exposure based on the trend strength rather than relying on discrete entry points.
________________________________________
Final Notes
As with all indicators, the RSI.Trend is most effective when used in conjunction with other technical tools and market context. It does not predict future price movements; rather, it reflects current market dynamics and recent directional tendencies. Use it with discretion and as part of a broader trading strategy.
The Relative Strength Index (RSI) is one of the most widely used classical indicators in technical analysis, typically employed to identify overbought or oversold market conditions. It reflects the degree of upside or downside dominance within a specified period. However, in its standard form, RSI is not particularly effective as a standalone entry trigger.
The Parsifal.RSI.Trend indicator builds upon the RSI to offer a more reliable method for distinguishing between bullish and bearish market regimes. It is a very simple, but surprisingly efficient concept.
________________________________________
Concept
In trending markets, an Exponential Moving Average (EMA) of the price is often smoother and more stable than raw price data. As a result, the RSI calculated on this smoothed price (i.e., the EMA) tends to react earlier and more consistently than the standard RSI. Specifically:
• In uptrends, the RSI of the EMA tends to exceed the RSI of the original price.
• In downtrends, it tends to lag behind.
The difference between these two RSI readings provides a stable and less noisy measure of market bias—positive in uptrends, negative in downtrends.
________________________________________
Indicator Mechanics
The RSI.Trend indicator works as follows:
• Baseline:
o 14-period RSI of the original price (RSI)
o 14-period EMA of that RSI (RSI.EMA)
• Trigger Line:
o 5-period EMA of the price series
o 14-period RSI on that smoothed price (RSI5M)
o 14-period EMA of RSI5M (RSI5M.EMA)
• The difference between the trigger line and the baseline reflects the current trend regime:
o A crossover of the trigger line above the baseline indicates a shift to a bullish regime.
o A crossunder signals a transition to a bearish regime.
________________________________________
RSI.Trend Background Value
The RSI.Trend Flow Background enhances this difference by incorporating recent changes in the trend state. This produces a slightly accelerated signal and visually shades the background:
• > 0 (Green background): Bullish regime
• < 0 (Red background): Bearish regime
________________________________________
How to Use RSI.Trend
• Use crossovers and crossunders between the trigger line and the baseline as entry signals or confirmation of regime shifts.
• The background value can serve as:
o A secondary confirmation signal
o A position sizing multiplier for continuous trading, adjusting exposure based on the trend strength rather than relying on discrete entry points.
________________________________________
Final Notes
As with all indicators, the RSI.Trend is most effective when used in conjunction with other technical tools and market context. It does not predict future price movements; rather, it reflects current market dynamics and recent directional tendencies. Use it with discretion and as part of a broader trading strategy.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.