PROTECTED SOURCE SCRIPT
Sri - Custom RSI Candle/Heikinashi Colors on MTF

Sri - Custom RSI Candle/Heikinashi Colors (TF RSI + EMA50 + Daily Trend Marker)
Short title: Sri - RSI EMA TF
Version: Pine Script v5
Overlay: Yes
Overview
This script enhances the standard RSI indicator by combining multiple features to visually represent market momentum and trend strength on both custom and daily timeframes. It recolors candlesticks or draws custom candles based on RSI levels relative to its EMA, offering a clear, intuitive way to identify trend direction and overbought/oversold conditions.
Key benefits include:
Multi-timeframe RSI & EMA analysis.
Optional Heikin Ashi or normal price source for RSI calculation.
Custom candle coloring for immediate visual insights.
Daily trend markers for longer-term trend context.
Features
Custom Timeframe RSI + EMA50
Calculate RSI on any user-selected timeframe (default: 5 min).
Apply a 50-period EMA on the RSI to identify trend direction.
Visual differentiation based on RSI relative to EMA:
Uptrend: RSI > EMA and above 50 → Blue candles
Downtrend: RSI < EMA and below 50 → Yellow candles
Conflict zones: RSI and EMA in opposite directions → Red or Green borders
Daily Trend Marker
Plots a tiny circle below each candle showing the daily RSI trend for additional context.
Helps align short-term trades with longer-term market direction.
Candle Visualization Options
Recolor built-in bars (default)
Custom candles with transparent bodies + colored borders
Overbought (RSI ≥ 70) → Dark Green
Oversold (RSI ≤ 30) → Orange
Heikin Ashi Support
Users can choose between Normal or Heikin Ashi candle prices as the RSI source.
Provides a smoother view of trends when using Heikin Ashi.
Transparency for Neutral Zones
Neutral or sideways RSI conditions are represented by transparent candles, reducing visual clutter.
Inputs
Input Description
Custom RSI Timeframe Select timeframe for RSI calculation (default: 5 min)
RSI Length Period for RSI calculation (default: 14)
EMA Length EMA period applied on RSI (default: 50)
Use custom candles True → draws custom candles with colored borders; False → recolors default bars
Price Source for RSI "Normal" or "Heikin Ashi"
Color Scheme
Condition Body Color Border Color
RSI ≥ 70 (Overbought) Dark Green Dark Green
RSI ≤ 30 (Oversold) Orange Orange
RSI ≥ 50 and RSI ≥ EMA Blue Blue
RSI < 50 and RSI ≤ EMA Yellow Yellow
RSI < 50 and RSI ≥ EMA Transparent Red (Conflict)
RSI ≥ 50 and RSI ≤ EMA Transparent Green (Conflict)
How to Use
Add the script to your chart.
Choose whether to use custom candles or recolor standard bars.
Set your preferred RSI timeframe and EMA length.
Optional: Switch between Normal or Heikin Ashi as the RSI source.
Observe candle colors and daily circles for trend alignment:
Green/Blue → Uptrend
Red/Yellow → Downtrend
Transparent → Neutral/conflict zones
Trading Insights
Candle colors quickly indicate short-term momentum relative to RSI and EMA.
Daily trend markers allow alignment of short-term trades with broader market context.
Conflict zones (transparent bodies with red/green borders) highlight caution areas where trend direction may be ambiguous.
Combining multiple timeframes (custom + daily) increases the accuracy of trend-based decision-making.
Notes
Works best when combined with other indicators (volume, support/resistance) for confirmation.
Ideal for scalping, intraday, or swing trading strategies.
Compatible with most symbols and timeframes supported by TradingView.
Short title: Sri - RSI EMA TF
Version: Pine Script v5
Overlay: Yes
Overview
This script enhances the standard RSI indicator by combining multiple features to visually represent market momentum and trend strength on both custom and daily timeframes. It recolors candlesticks or draws custom candles based on RSI levels relative to its EMA, offering a clear, intuitive way to identify trend direction and overbought/oversold conditions.
Key benefits include:
Multi-timeframe RSI & EMA analysis.
Optional Heikin Ashi or normal price source for RSI calculation.
Custom candle coloring for immediate visual insights.
Daily trend markers for longer-term trend context.
Features
Custom Timeframe RSI + EMA50
Calculate RSI on any user-selected timeframe (default: 5 min).
Apply a 50-period EMA on the RSI to identify trend direction.
Visual differentiation based on RSI relative to EMA:
Uptrend: RSI > EMA and above 50 → Blue candles
Downtrend: RSI < EMA and below 50 → Yellow candles
Conflict zones: RSI and EMA in opposite directions → Red or Green borders
Daily Trend Marker
Plots a tiny circle below each candle showing the daily RSI trend for additional context.
Helps align short-term trades with longer-term market direction.
Candle Visualization Options
Recolor built-in bars (default)
Custom candles with transparent bodies + colored borders
Overbought (RSI ≥ 70) → Dark Green
Oversold (RSI ≤ 30) → Orange
Heikin Ashi Support
Users can choose between Normal or Heikin Ashi candle prices as the RSI source.
Provides a smoother view of trends when using Heikin Ashi.
Transparency for Neutral Zones
Neutral or sideways RSI conditions are represented by transparent candles, reducing visual clutter.
Inputs
Input Description
Custom RSI Timeframe Select timeframe for RSI calculation (default: 5 min)
RSI Length Period for RSI calculation (default: 14)
EMA Length EMA period applied on RSI (default: 50)
Use custom candles True → draws custom candles with colored borders; False → recolors default bars
Price Source for RSI "Normal" or "Heikin Ashi"
Color Scheme
Condition Body Color Border Color
RSI ≥ 70 (Overbought) Dark Green Dark Green
RSI ≤ 30 (Oversold) Orange Orange
RSI ≥ 50 and RSI ≥ EMA Blue Blue
RSI < 50 and RSI ≤ EMA Yellow Yellow
RSI < 50 and RSI ≥ EMA Transparent Red (Conflict)
RSI ≥ 50 and RSI ≤ EMA Transparent Green (Conflict)
How to Use
Add the script to your chart.
Choose whether to use custom candles or recolor standard bars.
Set your preferred RSI timeframe and EMA length.
Optional: Switch between Normal or Heikin Ashi as the RSI source.
Observe candle colors and daily circles for trend alignment:
Green/Blue → Uptrend
Red/Yellow → Downtrend
Transparent → Neutral/conflict zones
Trading Insights
Candle colors quickly indicate short-term momentum relative to RSI and EMA.
Daily trend markers allow alignment of short-term trades with broader market context.
Conflict zones (transparent bodies with red/green borders) highlight caution areas where trend direction may be ambiguous.
Combining multiple timeframes (custom + daily) increases the accuracy of trend-based decision-making.
Notes
Works best when combined with other indicators (volume, support/resistance) for confirmation.
Ideal for scalping, intraday, or swing trading strategies.
Compatible with most symbols and timeframes supported by TradingView.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.