Skip to content
All library documents

MACD and Higher-Timeframe Supertrend for Directional Entries

Article Strategy library · Author: ChaoZhang

Summary

This strategy combines a MACD-style fast and slow average comparison with Supertrend direction to align entries across shorter and longer horizons. The code calculates the average difference and its signal line, then enters long when the short-term Supertrend turns upward, the higher-timeframe Supertrend is bullish, and the MACD value exceeds its signal. It enters short on the inverse conditions. Exits use fixed profit and loss distances.

The document includes a BTC/USDT futures configuration using five-minute chart data and a two-hour Supertrend timeframe, but gives no results from the brief sample backtest. It warns that fixed exits can limit gains and that disagreement between timeframes can suppress signals. Although the prose says MACD, the implementation uses simple moving averages for its fast and slow lines and signal line, rather than standard exponential MACD averages; this implementation detail matters when reproducing the rules.

Key ideas

  • Long entries require an upward short-term Supertrend change, bullish higher-timeframe Supertrend, and MACD-style value above its signal line.
  • Short entries use the inverse Supertrend and MACD-style conditions.
  • The source calculates the MACD components with simple moving averages rather than the usual exponential averages.
  • Exits use fixed profit and loss distances, which may constrain gains in extended trends.
  • The published BTC/USDT futures backtest setup reports no performance results.

Tags

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