MACDgen
Apr 21, 2019

The MACDgen indicator is a technical analysis tool designed to identify high-probability momentum reversals by filtering standard Moving Average Convergence Divergence signals with volatility and distance-based logic.
Usage
The MACDgen tool can be used to identify trend entries and exhaustion points through its multi-line display and integrated signal markers. Users can observe the interaction between the MACD Line, Signal Line, and a specialized Micro Line to gauge momentum shifts.
The indicator provides visual cues for potential trades:
- Upward Arrows: Indicate long conditions met when the MACD line crosses over the Micro line while satisfying distance and stability filters.
- Downward Arrows: Indicate short conditions met when the MACD line crosses under the Micro line while satisfying distance and stability filters.
- Histogram: Color-coded to show the strength and direction of the trend, helping traders visualize momentum expansion or contraction.
Details
The script enhances the traditional MACD calculation by introducing a "Micro" line (a 2-period SMA of the MACD line) and specific validation logic to reduce false signals:
- Volatility Filtering: It calculates an average difference between the Signal and Micro lines over a lookback period to ensure the lines have "proper distance" before triggering a signal.
- Stability Check: A history-of-crossing check ensures that signals are not triggered during periods of excessive volatility where the lines are crossing too frequently.
- MA Components: It utilizes a 5-period Fast EMA and a 10-period Slow EMA to derive the base MACD line, providing a more responsive sensitivity than standard settings.
Settings
- Fast Length: Sets the period for the fast Exponential Moving Average (default is 5).
- Slow Length: Sets the period for the slow Exponential Moving Average (default is 10).
FAQ
How do I use the MACDgen signals?
Signals are generated when the MACD and Micro lines cross, provided that the distance between the Signal and Micro lines exceeds a dynamic threshold and the market hasn't seen a cross in the very recent past.
What do the shapes at the bottom of the indicator represent?
The small circles and crosses represent the internal validation states (Histogram stability and Distance criteria) that must be true for a main arrow signal to appear.
How can I access MACDgen?
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.