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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。