OPEN-SOURCE SCRIPT

[CT] Relative Trend Index Advanced Coloring

821
The [CT] Relative Trend Index Advanced Coloring is an enhanced visual version of the original Relative Trend Index, RTI, created by Zeiierman. Full credit and respect go to Zeiierman for the original RTI concept, calculation logic, and foundation of this indicator. This ChaosTrader63 version preserves the original RTI calculation while adding visual upgrades designed to make bullish pressure, bearish pressure, and momentum shifts easier to read in real time.

The Relative Trend Index helps traders evaluate where price is positioned within a dynamic trend range. Instead of only reacting to raw price movement, RTI gives traders a smoother view of whether price is showing strength, weakness, or a possible directional shift. This can help traders recognize developing trend pressure before the move becomes obvious on the price chart.

Updates Added by ChaosTrader63

Automatic Bullish and Bearish RTI Line Coloring
The RTI line now changes color based on the selected condition. When the RTI condition is bullish, the line turns green. When the RTI condition is bearish, the line turns red. This makes the indicator easier to read quickly, especially during fast-moving markets.

Selectable RTI Color Mode
This version includes two different coloring modes, RTI vs MA and RTI vs 50. The RTI vs MA mode colors the RTI based on whether it is above or below its signal line, which can help identify earlier momentum shifts. The RTI vs 50 mode colors the RTI based on whether it is above or below the 50 midline, which can help provide broader trend confirmation.

Optional Price Bar Coloring
A price bar coloring option has been added so the chart candles can match the RTI condition. When enabled, bullish RTI conditions color the price bars green, and bearish RTI conditions color the price bars red. This helps connect the lower indicator directly to the price chart so traders can see when price action and RTI pressure are aligned.

User-Selectable Bullish and Bearish Colors
Traders can now choose their own bullish and bearish colors. This allows the indicator to better match each trader’s chart theme, visual preference, or existing trading system.

User-Selectable Moving Average Color
The RTI signal line color can also be customized. This makes it easier to separate the RTI line from the signal line visually and helps improve chart readability.

Cleaner Input Organization
The settings have been organized into cleaner groups, including RTI settings, signal line settings, overbought and oversold settings, color settings, and price bar settings. This makes the indicator easier to adjust and understand.

Original RTI Calculation Preserved
The core Zeiierman RTI calculation has not been changed. This update focuses on visualization and usability, not replacing the original logic.
Original Levels and Alert Conditions Preserved
The 50 midline, overbought level, oversold level, background fill, gradient fills, and alert conditions remain included so traders still have access to the original RTI structure and key reference zones.

This indicator can be used as a trend pressure tool, a momentum confirmation tool, or a visual filter when combined with price action, moving averages, market structure, support and resistance, volume, or ATR-based targets. The goal of this version is to make RTI easier to interpret at a glance while respecting and preserving the original work created by Zeiierman.

The Relative Trend Index is a trend pressure and momentum tool designed to show where price is trading within a dynamic trend range. Instead of simply looking at whether price is moving up or down, the RTI evaluates price in relation to upper and lower trend boundaries. This helps traders see whether the market is showing bullish strength, bearish weakness, or a possible shift in directional pressure.

When the RTI is rising, it can suggest that bullish pressure is building. When the RTI is falling, it can suggest that bearish pressure is increasing. When the RTI moves above its signal line, momentum may be shifting in favor of the bulls. When the RTI moves below its signal line, momentum may be shifting in favor of the bears. The 50 midline can also be used as a broader trend reference. Readings above 50 generally show stronger bullish pressure, while readings below 50 generally show stronger bearish pressure.

The overbought and oversold zones provide additional context. When the RTI moves into the upper zone, it may show strong bullish pressure or an extended move. When it moves into the lower zone, it may show strong bearish pressure or an extended downside move. These areas should not be treated as automatic buy or sell signals, because strong trends can remain elevated or depressed for long periods. The real value of the RTI is in helping traders read pressure, momentum, and possible trend shifts before the move becomes obvious on the price chart.

This tool can be used as a trend pressure indicator, a momentum confirmation tool, or a visual trade filter. Traders may use it with moving averages, price action, market structure, support and resistance, volume, or ATR targets. For example, if the RTI turns bearish, moves below the signal line, and price also breaks below a key moving average, that may confirm stronger downside pressure. If the RTI turns bullish, moves above the signal line, and price reclaims trend structure, that may confirm improving upside pressure.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.