OPEN-SOURCE SCRIPT
Colored TMA Trend Signals

Colored TMA Trend Signals is a clean trend-following indicator based on a Triangular Moving Average.
The TMA is calculated using double SMA smoothing. This creates a smoother line than a standard moving average and helps reduce short-term price noise.
The line changes color according to its current direction:
• Green — the TMA is rising
• Red — the TMA is falling
• Gray — the TMA is flat
Small triangle markers appear when the direction of the TMA changes:
• A green triangle marks a confirmed bullish direction change
• A red triangle marks a confirmed bearish direction change
The markers are confirmed only after the candle closes. They can be used as a visual indication of a possible trend shift, but they should not be treated as automatic entry signals.
Optional deviation bands are plotted around the TMA. They can help show when price is moving away from its smoothed average and may highlight possible dynamic reaction areas.
Available settings:
• TMA Half Length
• Price Source
• Optional Source Smoothing
• Smoothing Period
• Band Deviation
• Show or Hide Bands
• Show or Hide Trend Signals
• TMA Line Width
The indicator includes alert conditions for confirmed bullish and bearish TMA direction changes.
This script does not use centered calculations or future bars. Historical values remain stable after the candle closes.
Trend-change markers and alert conditions are confirmed only at candle close. The color of the TMA line may still change while the current candle is open because it reflects live price movement.
This indicator is not a standalone trading system. A change in TMA direction does not guarantee an immediate trend reversal. For better results, combine it with market structure, support and resistance, higher-timeframe direction, or your own confirmation method.
The TMA is calculated using double SMA smoothing. This creates a smoother line than a standard moving average and helps reduce short-term price noise.
The line changes color according to its current direction:
• Green — the TMA is rising
• Red — the TMA is falling
• Gray — the TMA is flat
Small triangle markers appear when the direction of the TMA changes:
• A green triangle marks a confirmed bullish direction change
• A red triangle marks a confirmed bearish direction change
The markers are confirmed only after the candle closes. They can be used as a visual indication of a possible trend shift, but they should not be treated as automatic entry signals.
Optional deviation bands are plotted around the TMA. They can help show when price is moving away from its smoothed average and may highlight possible dynamic reaction areas.
Available settings:
• TMA Half Length
• Price Source
• Optional Source Smoothing
• Smoothing Period
• Band Deviation
• Show or Hide Bands
• Show or Hide Trend Signals
• TMA Line Width
The indicator includes alert conditions for confirmed bullish and bearish TMA direction changes.
This script does not use centered calculations or future bars. Historical values remain stable after the candle closes.
Trend-change markers and alert conditions are confirmed only at candle close. The color of the TMA line may still change while the current candle is open because it reflects live price movement.
This indicator is not a standalone trading system. A change in TMA direction does not guarantee an immediate trend reversal. For better results, combine it with market structure, support and resistance, higher-timeframe direction, or your own confirmation method.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.