PROTECTED SOURCE SCRIPT
Cushioned RSI

The primary goal of this "Cushioned RSI" is to create a RSI indicator that provided a deeper level of context in reference to price movement
Instead of using raw price changes directly, it applies two distinct "damping" mechanisms to the underlying price gains and losses before they are fed into the final RSI calculation. This results in an RSI line that has built-in resistance to extreme movements.
The two core mechanisms are:
1. Base Damping (Gravity Towards 50)
This mechanism acts like a gravitational pull towards the neutral 50 level.
How it works: The script calculates how far the previous RSI value is from 50. The further it is, the stronger a damping factor is applied to any price movement that would push it even further away.
Effect: It becomes progressively more difficult for the RSI to accelerate towards the extreme values of 100 or 0. This slows down strong trends as they become more extended, creating a "cushioning" effect against momentum exhaustion.
2. Barrier Damping (Repulsive Force Fields)
This mechanism creates a soft, repulsive barrier around the user-defined overbought (default 70) and oversold (default 30) levels.
How it works: As the RSI value gets closer to either the 70 or 30 level, it calculates a proximity factor. This factor is used to create a powerful damping effect that intensifies exponentially the nearer the RSI gets to the barrier.
Effect: This prevents the RSI from sharply spiking through the overbought/oversold levels. Instead, it will tend to slow down, flatten out, and "cushion" against these boundaries. This effect is applied both when the RSI is approaching a barrier from the neutral zone and when it is returning to the neutral zone from an extreme level.
https://www.tradingview.com/x/0QoxPbbe/How It's Calculated
It starts with the standard price change (gain or loss) for the current bar.
It looks at the RSI value from the previous bar.
Based on the previous RSI value, it calculates and applies the Base Damping and Barrier Damping to the current gain and loss values, creating "adjusted" gains and losses.
Finally, it uses these "adjusted" values to calculate the RSI using the standard formula (which involves a smoothed moving average of the gains and losses).


Instead of using raw price changes directly, it applies two distinct "damping" mechanisms to the underlying price gains and losses before they are fed into the final RSI calculation. This results in an RSI line that has built-in resistance to extreme movements.
The two core mechanisms are:
1. Base Damping (Gravity Towards 50)
This mechanism acts like a gravitational pull towards the neutral 50 level.
How it works: The script calculates how far the previous RSI value is from 50. The further it is, the stronger a damping factor is applied to any price movement that would push it even further away.
Effect: It becomes progressively more difficult for the RSI to accelerate towards the extreme values of 100 or 0. This slows down strong trends as they become more extended, creating a "cushioning" effect against momentum exhaustion.
2. Barrier Damping (Repulsive Force Fields)
This mechanism creates a soft, repulsive barrier around the user-defined overbought (default 70) and oversold (default 30) levels.
How it works: As the RSI value gets closer to either the 70 or 30 level, it calculates a proximity factor. This factor is used to create a powerful damping effect that intensifies exponentially the nearer the RSI gets to the barrier.
Effect: This prevents the RSI from sharply spiking through the overbought/oversold levels. Instead, it will tend to slow down, flatten out, and "cushion" against these boundaries. This effect is applied both when the RSI is approaching a barrier from the neutral zone and when it is returning to the neutral zone from an extreme level.
https://www.tradingview.com/x/0QoxPbbe/How It's Calculated
It starts with the standard price change (gain or loss) for the current bar.
It looks at the RSI value from the previous bar.
Based on the previous RSI value, it calculates and applies the Base Damping and Barrier Damping to the current gain and loss values, creating "adjusted" gains and losses.
Finally, it uses these "adjusted" values to calculate the RSI using the standard formula (which involves a smoothed moving average of the gains and losses).
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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 dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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.