OPEN-SOURCE SCRIPT
THMA

THMA MTF
This indicator plots the Triangular Hull Moving Average (THMA), a smooth and responsive moving average based on the Hull concept. The formula follows the standard THMA definition used across multiple public TradingView scripts and libraries:
THMA = WMA( 3*WMA(src, L/3) - WMA(src, L/2) - WMA(src, L), L )
The idea behind THMA comes from the broader Hull Moving Average family, adapted with a triangular weighting scheme to reduce lag while keeping the line smooth. This implementation is my own Pine Script version, built from publicly available documentation and open-source THMA scripts on TradingView.
Features:
- Source and length are configurable (default length: 21).
- Line color changes depending on price position:
- Green when close is above THMA.
- Red when close is below THMA.
- Optional higher timeframe mode: you can calculate THMA on a higher timeframe (e.g., 5 min, 15 min, 1h) and display it on your current chart.
Use it as a trend filter or dynamic support/resistance level. As with any indicator, it’s best combined with your own price action and risk management rules.
This indicator plots the Triangular Hull Moving Average (THMA), a smooth and responsive moving average based on the Hull concept. The formula follows the standard THMA definition used across multiple public TradingView scripts and libraries:
THMA = WMA( 3*WMA(src, L/3) - WMA(src, L/2) - WMA(src, L), L )
The idea behind THMA comes from the broader Hull Moving Average family, adapted with a triangular weighting scheme to reduce lag while keeping the line smooth. This implementation is my own Pine Script version, built from publicly available documentation and open-source THMA scripts on TradingView.
Features:
- Source and length are configurable (default length: 21).
- Line color changes depending on price position:
- Green when close is above THMA.
- Red when close is below THMA.
- Optional higher timeframe mode: you can calculate THMA on a higher timeframe (e.g., 5 min, 15 min, 1h) and display it on your current chart.
Use it as a trend filter or dynamic support/resistance level. As with any indicator, it’s best combined with your own price action and risk management rules.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。