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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.