Skip to content
All library documents

MACD Histogram Thresholds for Long-Only Trading

Article Strategy library · Author: ChaoZhang

Summary

This long-only strategy uses the MACD histogram to trigger entries and exits, with a stop tied to the entry price. Its stated settings use 12- and 26-period exponential averages and a 9-period signal average. The written description says to enter when the histogram crosses above -0.04 and close when it crosses below 0.015; it also describes a 5% stop. The published backtest configuration covers BTC/USDT futures from January 4 to January 11, 2024, using 30-minute bars and a 15-minute base period, but gives no performance results.

There are material inconsistencies between the explanation and the supplied strategy logic. The code triggers the close on an upward crossover of 0.015, and its stop input is divided by 100 even though the parameter is 0.05, which implies a much smaller stop than the stated 5%. The text also leaves the currency pair unspecified in places. MACD lag, parameter sensitivity, and possible overfitting are acknowledged; the short sample and rule discrepancies make the strategy's effectiveness uncertain.

Key ideas

  • The strategy uses MACD histogram thresholds to open and close long positions.
  • The stated MACD settings are 12, 26, and 9 periods.
  • The description specifies a 5% stop, while the supplied code appears to calculate a smaller stop.
  • The written exit rule and coded crossover direction differ.
  • The published BTC/USDT futures test spans one week and reports no performance statistics.

Tags

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