OPEN-SOURCE SCRIPT
RSI Swing Indicator (Win-Rate + Forecast Line + Range Row)

What the script does:
It’s essentially an enhanced RSI tool that doesn’t just show the raw RSI line. Instead, it adds forecasting, trade statistics, and range detection so you can see how reliable RSI signals have been historically and what they might mean going forward.
The main components
RSI Calculation
- Uses your chosen source (close, hl2, etc.) and length (default 7).
- Plots the RSI line (orange).
Forecasting
- Projects RSI into the future using slope extrapolation.
- Plots a forecast line (blue) and shows whether RSI is likely to become overbought, oversold, or stay neutral.
Trade Statistics
- Tracks how many long and short trades would have been profitable based on RSI bias.
- Calculates Win‑Rate (percentage of profitable trades) and Average Return (average gain/loss per trade).
- This gives you a statistical edge: are longs or shorts historically working better?
Bias & Conflict Detection
- Defines current bias (Bullish, Bearish, Neutral).
- Flags Conflict when the forecast disagrees with the current bias (e.g., RSI bullish now but forecast bearish).
- Helps you avoid trading against weakening momentum.
Range Detection
- Checks if RSI slope is flat and values are between mid‑bounds (40–60).
- Calculates Range Probability (how often range conditions occur).
- Adds a Range row to the table so you know when the market is likely sideways instead of trending.
Table Display
- Summarizes everything in a neat table: Forecast, Win‑Rates, Avg Returns, Prob Bias, Conflict, Range Prob, and Range status.
- Color‑coded so you can instantly see what’s favorable (green), risky (red), or neutral (yellow/orange).
How to use it
- Trend trading: Look for Profitable Bias with forecast alignment.
- Range trading: When both win‑rates are weak and Range row says Range Likely, fade extremes (buy low RSI, sell high RSI).
- Risk management: Avoid trades when Conflict is flagged.
- Forecasting: Use the projected RSI to anticipate overbought/oversold zones before they happen.
In short:
The script is like a “smart RSI dashboard”. It takes the basic RSI, adds forecasting, tracks how well past trades worked, and tells you whether the market is trending or ranging. This way, you’re not just reacting to RSI — you’re trading with context, probabilities, and forward‑looking signals.
It’s essentially an enhanced RSI tool that doesn’t just show the raw RSI line. Instead, it adds forecasting, trade statistics, and range detection so you can see how reliable RSI signals have been historically and what they might mean going forward.
The main components
RSI Calculation
- Uses your chosen source (close, hl2, etc.) and length (default 7).
- Plots the RSI line (orange).
Forecasting
- Projects RSI into the future using slope extrapolation.
- Plots a forecast line (blue) and shows whether RSI is likely to become overbought, oversold, or stay neutral.
Trade Statistics
- Tracks how many long and short trades would have been profitable based on RSI bias.
- Calculates Win‑Rate (percentage of profitable trades) and Average Return (average gain/loss per trade).
- This gives you a statistical edge: are longs or shorts historically working better?
Bias & Conflict Detection
- Defines current bias (Bullish, Bearish, Neutral).
- Flags Conflict when the forecast disagrees with the current bias (e.g., RSI bullish now but forecast bearish).
- Helps you avoid trading against weakening momentum.
Range Detection
- Checks if RSI slope is flat and values are between mid‑bounds (40–60).
- Calculates Range Probability (how often range conditions occur).
- Adds a Range row to the table so you know when the market is likely sideways instead of trending.
Table Display
- Summarizes everything in a neat table: Forecast, Win‑Rates, Avg Returns, Prob Bias, Conflict, Range Prob, and Range status.
- Color‑coded so you can instantly see what’s favorable (green), risky (red), or neutral (yellow/orange).
How to use it
- Trend trading: Look for Profitable Bias with forecast alignment.
- Range trading: When both win‑rates are weak and Range row says Range Likely, fade extremes (buy low RSI, sell high RSI).
- Risk management: Avoid trades when Conflict is flagged.
- Forecasting: Use the projected RSI to anticipate overbought/oversold zones before they happen.
In short:
The script is like a “smart RSI dashboard”. It takes the basic RSI, adds forecasting, tracks how well past trades worked, and tells you whether the market is trending or ranging. This way, you’re not just reacting to RSI — you’re trading with context, probabilities, and forward‑looking signals.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.