All indicators

MACD+STOCHASTIC

Oct 14, 2016

Static chart image
SignalsOscillatorsMoving Averages

The MACD+STOCHASTIC indicator provides actionable buy and sell signals by combining momentum and oscillator data with fractal-based stop loss placement. This tool aims to identify trend reversals and momentum shifts by filtering price action through two classic technical analysis components.

Usage

The tool can be used to identify entry points based on the confluence of momentum (MACD) and overbought/oversold conditions (Stochastic).

  • Long Signals: Occur when the MACD divergence is increasing while the Stochastic %D is below the 25 level and turning upward.
  • Short Signals: Occur when the MACD divergence is decreasing while the Stochastic %D is above the 75 level and turning downward.

Users can apply fractal-based methods to determine stop loss levels, ensuring that trade exits are grounded in recent market structure.

Details

The script executes calculations for two primary components:

  1. MACD Calculation: It calculates the difference between a fast EMA and a slow EMA. The directional change of this divergence (whether it is higher or lower than the previous bar) determines the momentum filter.
  2. Stochastic Calculation: It calculates the Stochastic %K and %D values based on the high/low range over a specific lookback period. The logic requires the %D line to be in extreme zones (below 25 for longs, above 75 for shorts) and showing a reversal in direction to trigger a signal.

Settings

  • MACD Fast Length: The period used for the faster Exponential Moving Average in the MACD calculation.
  • MACD Slow Length: The period used for the slower Exponential Moving Average in the MACD calculation.
  • Stochastic %K Smoothing: The smoothing factor applied to the initial Stochastic calculation.
  • Stochastic %D Smoothing: The smoothing factor applied to the %K to create the %D signal line.
  • Stochastic Length: The lookback period used to determine the price range for the Stochastic oscillator.

FAQ

How do I interpret the MACD+STOCHASTIC signals?

Signals are generated when both indicators align: the MACD must show a shift in momentum direction, and the Stochastic must be recovering from an overbought or oversold extreme.

Can I change the sensitivity of the signals?

Yes, by adjusting the MACD Fast/Slow lengths or the Stochastic Length in the settings, you can make the indicator more or less responsive to price fluctuations.

How can I access MACD+STOCHASTIC?

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.