Smart MACD Crossover
Dec 5, 2025

The Smart MACD Crossover indicator provides a refined approach to trend trading by requiring price action confirmation through breakout boxes following a standard MACD crossover. This tool aims to filter out market noise and false signals commonly found in ranging environments by ensuring the price closes outside a predefined range before triggering an entry.
Usage
The Usage section highlights the unique mechanics of the Smart MACD Crossover. When a MACD crossover occurs, the script draws a horizontal "breakout box" based on the signal candle's range. A trade signal is only generated when price closes above or below this box.
- Bullish Signal: A "BUY" label or upward triangle appears when price breaks out of the top of a box created by a bullish MACD crossover.
- Bearish Signal: A "SELL" label or downward triangle appears when price breaks out of the bottom of a box created by a bearish MACD crossover.
- Filtering: By default, the script only shows signals where the breakout direction matches the MACD crossover direction.
- Visual Aids: Use the "Fog" visualization to gauge momentum; fog appearing below price suggests bullish pressure, while fog above indicates bearish pressure.
Details
The Smart MACD Crossover utilizes several layers of confirmation:
- MACD Core: Calculates standard Fast/Slow lengths to identify momentum shifts.
- Breakout Confirmation: Instead of entering immediately on a cross, the script locks the signal candle's High and Low. This creates a "no-trade" zone that must be breached.
- Scaled Overlay: The script can scale and plot the MACD lines directly on the price chart relative to the current price level, allowing traders to see momentum trends without looking at a separate oscillator pane.
- Fog Visualization: A multi-layered histogram effect uses average candle size and increasing transparency to create a visual "pressure" gradient around the price.
Settings
MACD Settings
- MACD Fast/Slow/Signal Lengths: Standard parameters for the MACD calculation.
- Signal Type: Choose between "Labels (Buy/Sell)" or "Triangles" for chart cleanliness.
- Show Only Matching Signals: Filters signals to only show breakouts that match the MACD trend.
- Box Multiplier: Allows users to extend the height of the breakout boxes based on the Average True Range.
Visual & Fog Settings
- Show Scaled MACD Lines: Toggles the plotting of MACD lines on the price chart.
- Show One-Side Histogram Fog: Toggles the momentum fog visualization.
- Fog Height & Transparency: Controls the vertical spread and visual density of the fog layers.
Risk Management Settings
- TP/SL Calculation Mode: Choose between "Candle Multiplier" (ATR-based) or "Percentage" for levels.
- TP1/TP2/TP3 & SL Multipliers: Sets the distance for target and stop levels based on the chosen mode.
FAQ
How do I interpret the breakout boxes?
The boxes represent a period of indecision following a MACD cross. If the box remains open and extends to the right, it means the price has not yet confirmed the trend by breaking out.
Can I use this for scalping or swing trading?
Yes, the script is versatile. By adjusting the MACD lengths and the TP/SL multipliers, you can tune the sensitivity for lower timeframes or longer-term trends.
How do I access Smart MACD Crossover?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.