Skip to content
All library documents

MACD Histogram State Trading with Higher-Timeframe Lookahead

Article Strategy library · Author: ChaoZhang

Summary

This strategy classifies the MACD histogram on a four-hour timeframe by both its sign and whether it is rising or falling. Those states are used to generate long and short entries or to close positions, with configurable MACD lengths and an optional mode described as using future information. In the source, that mode requests higher-timeframe data with lookahead enabled; the alternative uses lookahead disabled.

The document presents this as a way to follow trends and anticipate turning points, but supplies no measured performance results. The lookahead-enabled setting can expose information unavailable at the time of a real trade, creating a serious risk of lookahead bias in historical results. The rules also rely on a lagging indicator, provide no explicit stop-loss design, and may be affected by trading costs. The published backtest settings cover only a short BTC/USDT futures period, which is not enough to establish robustness.

Key ideas

  • The approach sorts the four-hour MACD histogram into states based on sign and direction of change.
  • Those states determine long entries, short entries, and position closures.
  • The optional lookahead mode can use future higher-timeframe values and bias backtests.
  • MACD lag, absent explicit stop-loss rules, and transaction costs are material limitations.
  • The short published test window provides no reported evidence of robust performance.

Tags

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