OPEN-SOURCE SCRIPT

Custom TRIX Indicator

Custom TRIX Indicator
This is a custom implementation of the TRIX (Triple Exponential Moving Average) indicator, which is designed to highlight the momentum of price movements while filtering out noise from price fluctuations. It calculates the percentage change in a triple-smoothed exponential moving average of the price, offering a smoother and more reliable view of market trends.

Key Features:

TRIX Length 1: A TRIX line calculated based on a 12-period triple exponential moving average (EMA) of the closing price.
TRIX Length 2: A second TRIX line calculated based on a 9-period triple exponential moving average (EMA) of the closing price.
Smoothed Oscillator: The TRIX values are calculated as the percentage change in the third EMA from the previous value, providing a momentum-based oscillator.
Visual Representation:
TRIX 12 is plotted in blue, representing the 12-period TRIX line.
TRIX 9 is plotted in red, representing the 9-period TRIX line.

Use Cases:

Trend Analysis: The TRIX indicator helps identify trends by showing the momentum and direction of the price.
Crossovers: When the two TRIX lines cross, it may signal a potential change in the market’s trend, providing possible buy or sell signals.
Smoothing: It filters out smaller price movements, offering a clearer picture of longer-term trends.
Moving AveragesTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer