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
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.