Skip to content
All library documents

Multi-Timeframe MACD Display and Signal-Cross Strategy

Article Strategy library · Author: ChaoZhang

Summary

This document describes a configurable MACD indicator that can display MACD and signal lines, mark their crossings, and color the histogram according to its direction and position relative to zero. Users can choose the chart timeframe or specify another resolution, and can toggle the display elements. The stated defaults are the conventional 12-period and 26-period EMAs with a 9-period signal calculation.

The accompanying strategy logic takes a long position when MACD is above its signal line and their absolute difference exceeds 90, and a short position under the reverse condition. The document supplies a BTC/USDT futures backtest configuration covering about a year, but gives no performance results. Its code also leaves the histogram plot commented out and does not show how the selected alternate timeframe is applied to the calculations, despite describing multi-timeframe support. The fixed difference threshold may depend on the asset and price scale, so the material does not establish portability or robustness.

Key ideas

  • The indicator offers configurable MACD lines, crossing markers, and histogram colors.
  • The defaults use 12-period and 26-period EMAs with a 9-period signal calculation.
  • The strategy enters long or short when MACD direction agrees and the line gap exceeds a fixed threshold.
  • The alternate timeframe selection is described, but its use in the calculations is not evident in the supplied source.
  • No performance results are provided for the stated futures backtest configuration.

Tags

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