All indicators

MACD Sniper

Mar 10, 2025

Static chart image
SignalsOscillatorsDashboardMoving Averages

The MACD Sniper indicator provides a comprehensive framework for market analysis by combining the Moving Average Convergence Divergence (MACD) oscillator with customizable moving average types and advanced signal filtering. It aims to deliver high-probability entry and exit signals by analyzing histogram momentum shifts and signal line crossovers alongside trend and momentum oscillators.

Usage

The indicator generates two primary types of signals which can be toggled in the settings:

  • Histogram Signals: A "Buy" signal (green triangle with "H" or "Buy") appears when the MACD histogram is below zero and starts rising after a user-defined minimum number of falling bars, suggesting a reversal from an oversold state. Conversely, a "Sell" signal (red triangle) appears when the histogram is above zero and starts falling after a minimum number of growing bars.
  • Moving Average Crossing Signals: These occur when the Fast Moving Average (MACD line) crosses the Slow Moving Average (Signal Line). A crossover from bottom to top suggests upward momentum, while a crossunder suggests downward pressure.

Details

The MACD Sniper allows users to select from 10 different Moving Average types for both the oscillator and the signal line, including EMA, SMA, WMA, VWMA, KAMA, HMA, ZLEMA, TEMA, ALMA, and DEMA. This flexibility enables the tool to adapt to different market volatilities and timeframes.

The tool includes several sophisticated filtering mechanisms:

  • Reentry Pause: Prevents signal clusters by requiring a minimum number of bars between consecutive alerts.
  • Wait Opposite: A logic filter that ensures a "Buy" signal is only generated after a "Sell" signal, and vice versa, which is effective in choppy or ranging markets.
  • Oscillator Filters: Includes integrated RSI, MFI, and Stochastic filters. Signals are only confirmed if these oscillators are within user-defined overbought or oversold ranges.
  • Trend Filter: An optional Supertrend filter ensures that signals only appear in alignment with the prevailing trend direction.

Settings

Signals

  • Histogram Signals: Toggle visibility of signals based on histogram momentum.
  • MA Signals: Toggle visibility of signals based on MACD/Signal line crossovers.
  • Min Falling/Growing Bars: Sets the required number of preceding histogram bars to confirm a momentum shift.

Filters

  • Reentry pause: The minimum number of bars required before a new signal can trigger.
  • Wait Opposite: If enabled, the indicator alternates between Buy and Sell signals.
  • Supertrend Filter: Filter signals based on trend direction using ATR and a multiplier.
  • RSI/MFI/Stoch Filters: Enable and configure length and threshold levels for momentum confirmation.

MACD Settings

  • Oscillator/Signal Line MA Type: Choose the mathematical method for calculation (e.g., EMA, HMA).
  • Source: The price data used (default is 'close').
  • Fast/Slow/Signal Length: Traditional MACD lookback periods.

FAQ

How do I interpret the histogram signals? Histogram signals (marked with "H") identify points where selling or buying pressure is exhausted while the oscillator is still on its respective side of the zero line, often catching reversals earlier than crossovers.

Can I use this for automated trading? Yes, the script includes logic for "Connectors" (Histogram, MA, and Combined) which are optimized for alert systems and strategy testing to help you evaluate historical performance.

How do I access the MACD Sniper? 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.