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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。