OPEN-SOURCE SCRIPT
THMA ~ CharonQuant

THMA is a high-precision trend following indicator designed to detect market transitions early while filtering out low-quality, low-momentum conditions.
Built on the Hull Moving Average framework, THMA extends the concept into a triple-nested structure that significantly reduces lag without sacrificing smoothness. The result is a fast, stable trend line that adapts well to volatile markets such as crypto, forex, and intraday equities.
Signals are not generated in isolation. Every long or short condition is validated through three independent filters:
Only when all filters align does a final signal trigger, helping suppress noise and whipsaw during ranging markets.
Visual Design
Alerts
Two native alert conditions are included:
THMA Long
Fires when finalLong becomes true
Condition, price > THMA, price > Trend EMA, ADX > threshold, +DI > −DI
THMA Short
Fires when finalShort becomes true
Condition, price < THMA, price < Trend EMA, ADX > threshold, −DI > +DI
Alert messages include exchange and ticker placeholders for automation and webhook use.
Important
No indicator replaces discipline or context.
THMA exists to reduce uncertainty, not eliminate risk.
Use it to escort price through volatility, not to chase it.
Built on the Hull Moving Average framework, THMA extends the concept into a triple-nested structure that significantly reduces lag without sacrificing smoothness. The result is a fast, stable trend line that adapts well to volatile markets such as crypto, forex, and intraday equities.
Signals are not generated in isolation. Every long or short condition is validated through three independent filters:
- Trend alignment via a higher-timeframe EMA
- Directional control using DI (+DI / −DI)
- Trend strength confirmation through ADX
Only when all filters align does a final signal trigger, helping suppress noise and whipsaw during ranging markets.
Visual Design
- Persistent THMA state coloring
Long, muted gold (#D4A017)
Short, deep burgundy (#6B2A3A) - Lighter confirmation states when conditions are partially met
- Trend EMA and dynamic price reference
- ADX with threshold displayed in a separate pane
Alerts
Two native alert conditions are included:
THMA Long
Fires when finalLong becomes true
Condition, price > THMA, price > Trend EMA, ADX > threshold, +DI > −DI
THMA Short
Fires when finalShort becomes true
Condition, price < THMA, price < Trend EMA, ADX > threshold, −DI > +DI
Alert messages include exchange and ticker placeholders for automation and webhook use.
Important
No indicator replaces discipline or context.
THMA exists to reduce uncertainty, not eliminate risk.
Use it to escort price through volatility, not to chase it.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。