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 aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.