Skip to content
All library documents

MACD Trend Filtering with Stochastic Entry and Exit Signals

Article Strategy library · Author: ChaoZhang

Summary

This strategy combines a long-horizon MACD trend filter with Stochastic signals for entries and exits. Its code tracks changes in the MACD histogram across several lookback intervals to set a directional state. Long entries require a rising Stochastic measure in a lower range alongside other conditions, including rising volume; short entries use the corresponding high-range decline conditions. Stochastic thresholds, histogram-based conditions, and fixed percentage stops and targets also contribute to exits.

The document gives indicator logic, parameters, and a short BTC/USDT futures backtest configuration, but reports no performance statistics. The prose describes the method more generally than the code, whose entry conditions include additional state and histogram checks. It does not establish profitability or robustness. The stated risks include false Stochastic signals, incorrect trend readings, stop slippage, and sensitivity to parameter and market changes.

Key ideas

  • A multi-interval MACD histogram comparison supplies the strategy’s directional filter.
  • Stochastic movement near low or high ranges helps time entries and exits.
  • The code also uses volume and state conditions to qualify trades.
  • Fixed percentage stops and profit targets are included, but no backtest results are reported.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.