OPEN-SOURCE SCRIPT
Triple Moving Averages (TriMA)

Triple Moving Averages (TriMA)
Triple Moving Averages (TriMA) is a flexible multi-timeframe trend analysis indicator that displays up to three independently configurable moving averages on a single chart. Each moving average can use its own calculation method, price source, length, and timeframe, making it ideal for trend following, market structure analysis, and higher-timeframe context without switching charts.
────────────────────────────────────
Key Features
Three Independent Moving Averages
Display up to three moving averages simultaneously. The 2nd and 3rd MAs can be enabled or disabled independently for simplified or advanced analysis.
Multiple Moving Average Types
Each MA supports:
- Hull Moving Average (HMA)
- Simple Moving Average (SMA)
- Weighted Moving Average (WMA)
- Volume Weighted Moving Average (VWMA)
- Smoothed Moving Average (SWMA)
- Running Moving Average (RMA)
All moving averages operate independently and can be combined freely.
Independent Timeframes
Each MA can be calculated from a different timeframe while plotted on the current chart.
Example:
- 180 HMA on 1-minute
- 288 SMA on 5-minute
- 720 VWMA on 10-minute
This provides built-in multi-timeframe trend context.
Independent Lengths & Sources
Each MA has its own:
- Length
- Price source (Close, HLCC4, OHLC4, etc.)
- Calculation type
- Timeframe
────────────────────────────────────
Automatic Time Labels
Optional labels show:
- MA type
- Effective timeframe duration (real-world time equivalent)
Examples:
- HMA 3 h
- SMA 5 d
- VWMA 2.5 mnth
The indicator converts Length × Timeframe into intuitive time duration, making it easier to understand the real smoothing strength of each MA.
────────────────────────────────────
Smart Label Positioning
Labels are:
- Plotted directly on each MA
- Offset from the latest price action
- Automatically oriented based on slope (up/down)
This keeps the chart clean while maintaining readability.
────────────────────────────────────
Visual Customization
You can customize:
- Line colors
- Transparency
- Label text color
- Label size
- Label visibility
- Offset position
Each MA is fully independent in styling.
────────────────────────────────────
Typical Uses
Trend Identification
Detect overall market direction using slower MAs.
Multi-Timeframe Analysis
Combine higher timeframe trend context with lower timeframe execution.
Dynamic Support & Resistance
Use MAs as dynamic reaction zones in trending markets.
Trend Alignment
Identify when multiple timeframes align for higher-probability setups.
Market Context
Avoid trading against higher timeframe direction.
────────────────────────────────────
Default Setup
- MA1: 180 HMA (1-minute)
- MA2: 288 HMA (5-minute)
- MA3: 720 HMA (10-minute)
This creates a balanced short/medium/long trend structure.
────────────────────────────────────
Highlights
- Up to 3 independent moving averages
- 6 MA calculation methods
- Full multi-timeframe support
- Independent settings per MA
- Automatic time-based labeling
- Clean visual structure
- Fully customizable appearance
TriMA is designed for traders who want a clean but powerful multi-timeframe trend system combining multiple moving averages into one structured view.
Triple Moving Averages (TriMA) is a flexible multi-timeframe trend analysis indicator that displays up to three independently configurable moving averages on a single chart. Each moving average can use its own calculation method, price source, length, and timeframe, making it ideal for trend following, market structure analysis, and higher-timeframe context without switching charts.
────────────────────────────────────
Key Features
Three Independent Moving Averages
Display up to three moving averages simultaneously. The 2nd and 3rd MAs can be enabled or disabled independently for simplified or advanced analysis.
Multiple Moving Average Types
Each MA supports:
- Hull Moving Average (HMA)
- Simple Moving Average (SMA)
- Weighted Moving Average (WMA)
- Volume Weighted Moving Average (VWMA)
- Smoothed Moving Average (SWMA)
- Running Moving Average (RMA)
All moving averages operate independently and can be combined freely.
Independent Timeframes
Each MA can be calculated from a different timeframe while plotted on the current chart.
Example:
- 180 HMA on 1-minute
- 288 SMA on 5-minute
- 720 VWMA on 10-minute
This provides built-in multi-timeframe trend context.
Independent Lengths & Sources
Each MA has its own:
- Length
- Price source (Close, HLCC4, OHLC4, etc.)
- Calculation type
- Timeframe
────────────────────────────────────
Automatic Time Labels
Optional labels show:
- MA type
- Effective timeframe duration (real-world time equivalent)
Examples:
- HMA 3 h
- SMA 5 d
- VWMA 2.5 mnth
The indicator converts Length × Timeframe into intuitive time duration, making it easier to understand the real smoothing strength of each MA.
────────────────────────────────────
Smart Label Positioning
Labels are:
- Plotted directly on each MA
- Offset from the latest price action
- Automatically oriented based on slope (up/down)
This keeps the chart clean while maintaining readability.
────────────────────────────────────
Visual Customization
You can customize:
- Line colors
- Transparency
- Label text color
- Label size
- Label visibility
- Offset position
Each MA is fully independent in styling.
────────────────────────────────────
Typical Uses
Trend Identification
Detect overall market direction using slower MAs.
Multi-Timeframe Analysis
Combine higher timeframe trend context with lower timeframe execution.
Dynamic Support & Resistance
Use MAs as dynamic reaction zones in trending markets.
Trend Alignment
Identify when multiple timeframes align for higher-probability setups.
Market Context
Avoid trading against higher timeframe direction.
────────────────────────────────────
Default Setup
- MA1: 180 HMA (1-minute)
- MA2: 288 HMA (5-minute)
- MA3: 720 HMA (10-minute)
This creates a balanced short/medium/long trend structure.
────────────────────────────────────
Highlights
- Up to 3 independent moving averages
- 6 MA calculation methods
- Full multi-timeframe support
- Independent settings per MA
- Automatic time-based labeling
- Clean visual structure
- Fully customizable appearance
TriMA is designed for traders who want a clean but powerful multi-timeframe trend system combining multiple moving averages into one structured view.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。