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
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.