OPEN-SOURCE SCRIPT
High-Confluence SuperTrend + MACD v5 (FIXED)

1. How to Read a Trade Signal (Entry Criteria)
A Green Buy Signal (Long) or Red Sell Signal (Short) appears when ALL of the following conditions are true at the close of the bar:
🟢 For a BUY Signal (Long):
SuperTrend: The line is Green (or just flipped to Green).
MACD Crossover: The MACD Line crosses above the Signal Line (Bullish Crossover).
RSI Filter: RSI is above 50 (Confirming underlying bullish momentum).
Volume: Current Volume is high (above the moving average of volume, set by the Volume Surge Multiplier).
ADX (If Used): The ADX value is above the Threshold (e.g., 20 or 25), confirming a strong trend exists.
🔴 For a SELL Signal (Short):
SuperTrend: The line is Red (or just flipped to Red).
MACD Crossover: The MACD Line crosses below the Signal Line (Bearish Crossover).
RSI Filter: RSI is below 50 (Confirming underlying bearish momentum).
Volume: Current Volume is high (above the moving average of volume).
ADX (If Used): The ADX value is above the Threshold, confirming a strong trend exists.
2. Parameter Guidance (Settings for Different Trading Styles)
You must change the indicator lengths (periods) when switching between fast (intraday) and slow (swing) trading, as well as for different assets.
A. Settings for FAST Trading (Scalping / Low Timeframes like 5m):
Goal: Be sensitive and catch quick moves.
SuperTrend Period: Use a smaller number (e.g., 7 or 8).
SuperTrend Multiplier: Use a smaller number (e.g., 1.5 or 2.0) to keep the line close to price.
MACD Lengths: Use shorter lengths (e.g., Fast: 8, Slow: 17, Signal: 9) for faster crossovers.
ADX Lengths: Use shorter lengths (e.g., 10 or 12).
B. Settings for SLOW Trading (Swing / High Timeframes like Daily):
Goal: Filter noise and capture major trends.
SuperTrend Period: Use a higher number (e.g., 14 or 20).
SuperTrend Multiplier: Use a higher number (e.g., 3.0 or 4.0) to avoid false flips.
MACD Lengths: Use standard or longer lengths (e.g., Standard 12/26/9, or longer 20/40/9).
ADX Lengths: Use standard or longer lengths (e.g., 14 or 20).
3. Critical Filter: Using the ADX
The ADX component is your quality control filter. It measures the strength of the trend, not the direction.
When to Enable ADX: Turn Use ADX Filter to True when the market is choppy or sideways.
Threshold Rule: If the ADX line is below 20, the market is ranging, and the filter will block signals, saving you from false whipsaws.
Signal Strength: A signal is strongest when ADX is above 25.
dyor, nfa
A Green Buy Signal (Long) or Red Sell Signal (Short) appears when ALL of the following conditions are true at the close of the bar:
🟢 For a BUY Signal (Long):
SuperTrend: The line is Green (or just flipped to Green).
MACD Crossover: The MACD Line crosses above the Signal Line (Bullish Crossover).
RSI Filter: RSI is above 50 (Confirming underlying bullish momentum).
Volume: Current Volume is high (above the moving average of volume, set by the Volume Surge Multiplier).
ADX (If Used): The ADX value is above the Threshold (e.g., 20 or 25), confirming a strong trend exists.
🔴 For a SELL Signal (Short):
SuperTrend: The line is Red (or just flipped to Red).
MACD Crossover: The MACD Line crosses below the Signal Line (Bearish Crossover).
RSI Filter: RSI is below 50 (Confirming underlying bearish momentum).
Volume: Current Volume is high (above the moving average of volume).
ADX (If Used): The ADX value is above the Threshold, confirming a strong trend exists.
2. Parameter Guidance (Settings for Different Trading Styles)
You must change the indicator lengths (periods) when switching between fast (intraday) and slow (swing) trading, as well as for different assets.
A. Settings for FAST Trading (Scalping / Low Timeframes like 5m):
Goal: Be sensitive and catch quick moves.
SuperTrend Period: Use a smaller number (e.g., 7 or 8).
SuperTrend Multiplier: Use a smaller number (e.g., 1.5 or 2.0) to keep the line close to price.
MACD Lengths: Use shorter lengths (e.g., Fast: 8, Slow: 17, Signal: 9) for faster crossovers.
ADX Lengths: Use shorter lengths (e.g., 10 or 12).
B. Settings for SLOW Trading (Swing / High Timeframes like Daily):
Goal: Filter noise and capture major trends.
SuperTrend Period: Use a higher number (e.g., 14 or 20).
SuperTrend Multiplier: Use a higher number (e.g., 3.0 or 4.0) to avoid false flips.
MACD Lengths: Use standard or longer lengths (e.g., Standard 12/26/9, or longer 20/40/9).
ADX Lengths: Use standard or longer lengths (e.g., 14 or 20).
3. Critical Filter: Using the ADX
The ADX component is your quality control filter. It measures the strength of the trend, not the direction.
When to Enable ADX: Turn Use ADX Filter to True when the market is choppy or sideways.
Threshold Rule: If the ADX line is below 20, the market is ranging, and the filter will block signals, saving you from false whipsaws.
Signal Strength: A signal is strongest when ADX is above 25.
dyor, nfa
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.