OPEN-SOURCE SCRIPT
Supertrend + MACD + HMA

Indicator Description: Supertrend + MACD + HMA
General Summary
It is a composite technical indicator that combines three analysis tools to generate buy and sell signals in institutional trading. It uses confirmation from multiple indicators to increase the precision of market entries.
Components
1. Supertrend (ST)
Function: Identifies the main market trend (bullish or bearish)
Parameters: ATR Length 10, Factor 3.0
Visualization:
Green line = Bullish trend
Red line = Bearish trend
Semi-transparent green/red background that fills the area according to direction
How it works: Uses ATR (Average True Range) to calculate dynamic support and resistance bands
2. MACD (Moving Average Convergence Divergence)
Function: Measures price momentum and direction
Parameters: Fast 18, Slow 144, Signal Smoothing 9
Components:
MACD Line (orange): Difference between two EMAs
Signal Line (purple): EMA of the MACD
Histogram (green/red columns): Difference between MACD and its signal
Green = Positive histogram (bullish momentum)
Red = Negative histogram (bearish momentum)
3. HMA 100 (Hull Moving Average)
Function: Identifies support/resistance level and price direction
Parameters: Length 100
Visualization: Blue thick line
Characteristics:
Less lag than traditional moving averages
Price > HMA = Bullish trend
Price < HMA = Bearish trend
Signal Logic
🟢 BUY SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD positive (histogram > 0)
Price above HMA 100
Supertrend in Bullish mode
Supertrend Change:
Supertrend changes from Bearish to Bullish
MACD remains positive
Price above HMA
Price Crossover:
Price crosses above HMA (at candle close)
Supertrend is in Bullish mode
MACD is positive
🔴 SELL SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD negative (histogram < 0)
Price below HMA 100
Supertrend in Bearish mode
Supertrend Change:
Supertrend changes from Bullish to Bearish
MACD remains negative
Price Crossover:
Price crosses below HMA (at candle close)
Supertrend is in Bearish mode
MACD is negative
Important Features
✅ Single Signal Per Type
Once a BUY is generated, no other BUY is generated until a SELL appears
Avoids multiple entries in the same direction
✅ Crossover Detection
The indicator generates signals at candle close when price crosses HMA
Allows capturing quick market moves
✅ Trend Changes
Detects when Supertrend changes direction
Provides early exits from the market
✅ Automatic Alerts
Push notifications when BUY or SELL is generated
Ideal for automated trading
General Summary
It is a composite technical indicator that combines three analysis tools to generate buy and sell signals in institutional trading. It uses confirmation from multiple indicators to increase the precision of market entries.
Components
1. Supertrend (ST)
Function: Identifies the main market trend (bullish or bearish)
Parameters: ATR Length 10, Factor 3.0
Visualization:
Green line = Bullish trend
Red line = Bearish trend
Semi-transparent green/red background that fills the area according to direction
How it works: Uses ATR (Average True Range) to calculate dynamic support and resistance bands
2. MACD (Moving Average Convergence Divergence)
Function: Measures price momentum and direction
Parameters: Fast 18, Slow 144, Signal Smoothing 9
Components:
MACD Line (orange): Difference between two EMAs
Signal Line (purple): EMA of the MACD
Histogram (green/red columns): Difference between MACD and its signal
Green = Positive histogram (bullish momentum)
Red = Negative histogram (bearish momentum)
3. HMA 100 (Hull Moving Average)
Function: Identifies support/resistance level and price direction
Parameters: Length 100
Visualization: Blue thick line
Characteristics:
Less lag than traditional moving averages
Price > HMA = Bullish trend
Price < HMA = Bearish trend
Signal Logic
🟢 BUY SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD positive (histogram > 0)
Price above HMA 100
Supertrend in Bullish mode
Supertrend Change:
Supertrend changes from Bearish to Bullish
MACD remains positive
Price above HMA
Price Crossover:
Price crosses above HMA (at candle close)
Supertrend is in Bullish mode
MACD is positive
🔴 SELL SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD negative (histogram < 0)
Price below HMA 100
Supertrend in Bearish mode
Supertrend Change:
Supertrend changes from Bullish to Bearish
MACD remains negative
Price Crossover:
Price crosses below HMA (at candle close)
Supertrend is in Bearish mode
MACD is negative
Important Features
✅ Single Signal Per Type
Once a BUY is generated, no other BUY is generated until a SELL appears
Avoids multiple entries in the same direction
✅ Crossover Detection
The indicator generates signals at candle close when price crosses HMA
Allows capturing quick market moves
✅ Trend Changes
Detects when Supertrend changes direction
Provides early exits from the market
✅ Automatic Alerts
Push notifications when BUY or SELL is generated
Ideal for automated trading
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.