Mar 6, 2025

Slope Based TEMA RSI

This script introduces an simple market momentum analysis system by integrating a triple exponential moving average (TEMA) into the traditional relative strength index (RSI) framework. Unlike conventional RSI implementations that rely solely on a single price input, this approach calculates RSI across multiple price points, including open, high, low, and close, creating a layered and comprehensive view of price action.

The script employs a recursive smoothing function that applies three consecutive exponential moving averages to each RSI computation. This reduces short-term fluctuations while maintaining responsiveness, allowing for a clearer representation of underlying momentum trends. By eliminating excessive noise and refining signal accuracy, the modified RSI structure provides a more stable and predictive output.

To assess market direction, the system evaluates the slope of all calculated RSI values. If all smoothed RSI sources indicate a consistent upward trajectory, the script identifies a strong bullish condition. Conversely, if all sources align in a downward motion, it signals a bearish phase. When RSI slopes exhibit mixed directional movement, the output adapts to a neutral state, reflecting market indecision.

A dynamic visualization method enhances clarity by using an adaptive color-coding mechanism. The primary RSI, derived from the close price, is displayed as a solid line, while secondary RSI values based on open, high, and low prices are semi-transparent. This allows for a structured yet detailed representation of momentum shifts, ensuring that traders can quickly interpret trend alignment and potential reversals.

By combining multi-source RSI analysis, TEMA-based smoothing, and slope-driven trend evaluation, this script delivers a refined momentum indicator that enhances trend detection and eliminates transient fluctuations. Its design ensures a balanced approach between sensitivity and stability, making it an effective tool for identifying sustained directional bias in price action.