OPEN-SOURCE SCRIPT
Atualizado Supertrend with RSI Filter

This indicator is an enhanced version of the classic Supertrend, incorporating an RSI (Relative Strength Index) filter to refine trend signals. Here is a detailed explanation of its functionality and key advantages over the traditional Supertrend.
1. Indicator Functionality
The indicator uses ATR (Average True Range) to calculate the Supertrend line, just like the classic version. However, it introduces an additional condition based on RSI to strengthen or weaken the Supertrend color based on market momentum.
2. Interpretation of Colors
The indicator displays the Supertrend line with dynamic colors based on trend direction and RSI strength:
- Uptrend (Supertrend in buy mode):
- Dark green (Teal): RSI above the defined threshold (default 50) → Strong bullish confirmation.
- Light gray: RSI below the threshold → Indicates a weaker uptrend or lack of confirmation.
- Downtrend (Supertrend in sell mode):
- Dark red: RSI below the threshold → Strong bearish confirmation.
- Light gray: RSI above the threshold → Indicates a weaker downtrend or lack of confirmation.
The opacity of the color dynamically adjusts based on how far RSI is from its threshold. The greater the difference, the more vivid the color, signaling a stronger trend.
3. Key Advantages Over the Classic Supertrend
- Filters out false signals: The RSI integration helps reduce false signals by only validating trends when RSI aligns with the Supertrend direction.
- Weakens uncertain signals: When RSI is close to its threshold, the color becomes more transparent, alerting traders to a less reliable trend.
- Classic mode available: The 'Use Classic Supertrend' option allows switching to a standard Supertrend display (fixed red/green) without the RSI effect.
4. Customizable Parameters
- ATR Length & ATR Factor: Define the sensitivity of the Supertrend.
- RSI Period & RSI Threshold: Allow refining the RSI filter based on market volatility.
- Classic mode: Enables/disables the RSI filtering to revert to the original Supertrend.
This indicator is especially valuable for traders looking to refine their trend signals based on market momentum measured by RSI.
This indicator is for informational purposes only and should not be considered financial advice. Trading involves risks, and past performance does not guarantee future results. Always conduct your own analysis before making any trading decisions.
1. Indicator Functionality
The indicator uses ATR (Average True Range) to calculate the Supertrend line, just like the classic version. However, it introduces an additional condition based on RSI to strengthen or weaken the Supertrend color based on market momentum.
2. Interpretation of Colors
The indicator displays the Supertrend line with dynamic colors based on trend direction and RSI strength:
- Uptrend (Supertrend in buy mode):
- Dark green (Teal): RSI above the defined threshold (default 50) → Strong bullish confirmation.
- Light gray: RSI below the threshold → Indicates a weaker uptrend or lack of confirmation.
- Downtrend (Supertrend in sell mode):
- Dark red: RSI below the threshold → Strong bearish confirmation.
- Light gray: RSI above the threshold → Indicates a weaker downtrend or lack of confirmation.
The opacity of the color dynamically adjusts based on how far RSI is from its threshold. The greater the difference, the more vivid the color, signaling a stronger trend.
3. Key Advantages Over the Classic Supertrend
- Filters out false signals: The RSI integration helps reduce false signals by only validating trends when RSI aligns with the Supertrend direction.
- Weakens uncertain signals: When RSI is close to its threshold, the color becomes more transparent, alerting traders to a less reliable trend.
- Classic mode available: The 'Use Classic Supertrend' option allows switching to a standard Supertrend display (fixed red/green) without the RSI effect.
4. Customizable Parameters
- ATR Length & ATR Factor: Define the sensitivity of the Supertrend.
- RSI Period & RSI Threshold: Allow refining the RSI filter based on market volatility.
- Classic mode: Enables/disables the RSI filtering to revert to the original Supertrend.
This indicator is especially valuable for traders looking to refine their trend signals based on market momentum measured by RSI.
This indicator is for informational purposes only and should not be considered financial advice. Trading involves risks, and past performance does not guarantee future results. Always conduct your own analysis before making any trading decisions.
Notas de Lançamento
Minor update: Removed gray zones to keep only red and teal, with increasing transparency when there is no clear trend.Notas de Lançamento
Updated description for better clarity and compliance with TradingView publishing rules.Supertrend with RSI Filter
Overview
This script enhances the Supertrend indicator by integrating an RSI-based transparency filter, making trend identification more intuitive and reducing noise in volatile markets.
The standard Supertrend is an ATR-based trailing stop that helps traders identify trend direction. However, it can sometimes give false signals in ranging or weak-trend conditions. The RSI filter mitigates this by adjusting the background transparency dynamically based on RSI levels, making it easier to interpret strong vs. weak trends.
Why This Combination?
Traditional Supertrend indicators provide a simple visual cue for trends but do not differentiate between strong and weak momentum. By introducing an RSI-based transparency filter, we can:
- Reduce false signals in choppy markets
- Emphasize strong trends when RSI confirms the trend direction
- Make trend visualization more intuitive by dynamically adjusting background opacity
How It Works
Supertrend Calculation:
- The indicator calculates the Supertrend using the ATR (Average True Range) to define volatility-based trend changes.
- When the price is above the Supertrend line, the trend is bullish; when it is below, the trend is bearish.
RSI-Based Transparency:
- The Relative Strength Index (RSI) is used as a filter to modify the background transparency dynamically.
- When RSI is far from the set threshold, the trend is considered strong, and the background is more opaque.
- When RSI is near the threshold, the trend is considered weaker, and the background becomes more transparent.
- This helps visually distinguish between strong momentum trends and potentially weak or ranging conditions.
Customization Options
The script includes multiple adjustable parameters to tailor the indicator to your trading style:
- ATR Length & ATR Factor → Controls Supertrend sensitivity
- RSI Period → Defines how RSI is calculated
- RSI Threshold → Determines the sensitivity of the transparency effect
- Use Classic Supertrend Mode → Enables/disables the dynamic RSI-based transparency
- Color Customization → Adjusts line and background colors for better visibility
How to Use It in Trading
1. Trend Confirmation: Look for the Supertrend line to change direction as a confirmation of trend reversal.
2. Momentum Strength: When the background is more opaque, it indicates a stronger trend (RSI confirms momentum).
3. Avoiding False Breakouts: A more transparent background suggests weaker trend confirmation, helping traders avoid choppy conditions.
4. Scalping & Swing Trading: Works across different timeframes for both short-term scalping and long-term trend following.
Ideal for Traders Who:
- Want a visually enhanced Supertrend indicator
- Need a way to filter out weak trends
- Trade volatile markets and want to reduce noise
- Use RSI as a confirmation tool for trend strength
Final Thoughts
This indicator provides a clearer trend visualization by integrating RSI-based dynamic transparency, helping traders differentiate strong vs. weak trends more easily. It can be used on any asset and timeframe, making it a versatile tool for different trading strategies.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Para acesso rápido no gráfico, adicione esse script para seus favoritos — saiba mais aqui.
The trend is your friend, until it's not...
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Para acesso rápido no gráfico, adicione esse script para seus favoritos — saiba mais aqui.
The trend is your friend, until it's not...
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.