Dual-Supertrend with MACD - Strategy
Aug 30, 2023

The Dual-Supertrend with MACD - Strategy indicator combines trend-following logic and momentum analysis to provide a systematic, objective approach to trading trends while minimizing false signals.
Usage
The strategy is designed to identify high-probability trend continuations by requiring multiple layers of confirmation. A long position is initiated when both Supertrend components signal a bullish trend and the MACD histogram is positive. Conversely, a short position is entered when both Supertrends are bearish and the MACD histogram is negative.
Exits are triggered when the trend weakens or momentum shifts. For example, a long trade is closed if either Supertrend flips to a bearish state or the MACD histogram drops below zero. This logic ensures that trades are exited promptly when the supporting conditions for the trend are no longer present.
Details
The strategy utilizes three primary components to validate price action:
- Dual Supertrend Validation: By employing two Supertrend calculations with distinct ATR periods and multipliers, the strategy creates a "double-check" mechanism. This filtering process helps traders stay in strong trends while avoiding the volatility "noise" that often triggers single-indicator signals.
- MACD Momentum Filter: The Moving Average Convergence Divergence (MACD) histogram serves as the final filter. This ensures that the strategy only takes trades that exhibit positive momentum in the direction of the confirmed trend.
- Automated Execution Logic: The script is built as a strategy, allowing users to backtest performance with defined parameters for commission and slippage, ensuring the results reflect realistic trading costs.
Settings
- Trading Direction: Choose between "long", "short", or "both" to align with your market bias.
- Fast Length: The period for the fast moving average in the MACD calculation.
- Slow Length: The period for the slow moving average in the MACD calculation.
- Signal Smoothing: The period used to smooth the MACD signal line.
- Oscillator MA Type: Select between SMA or EMA for the MACD line calculation.
- Signal Line MA Type: Select between SMA or EMA for the MACD signal line.
- ATR Length for Supertrend 1 & 2: Determines the lookback period for the Average True Range used in each Supertrend.
- Factor for Supertrend 1 & 2: The multiplier applied to the ATR to set the distance of the Supertrend line from the price.
FAQ
How do I access Dual-Supertrend with MACD - Strategy?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Which timeframe works best for this strategy?
The strategy is most effective on timeframes where trends are clearly established, such as the 4-hour, 8-hour, or Daily charts.
Can I change the sensitivity of the signals?
Yes, by adjusting the ATR Factors for the Supertrends or the MACD smoothing lengths, you can make the strategy more reactive or more conservative depending on your trading style.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.