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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.