Skip to content
All library documents

EMA–HMA Trend Following with Heikin-Ashi and Stop Loss

Article Strategy library · Author: ChaoZhang

Summary

This trend-following method compares a faster exponential moving average with a slower Hull moving average. The implementation enters a long position when the EMA is above the HMA and closes it when the HMA moves above the EMA, provided the open trade is profitable. An optional Heikin-Ashi close supplies the price series for both averages, and a configurable percentage stop can close a losing long position. Although the overview describes crossover entries and buying or selling at the next bar’s open, the source implements a long-only position and does not open shorts.

The document presents configurable settings and a BTC/USDT futures backtest period, but includes no performance results. It identifies sideways markets, reversals, and poorly chosen parameters or stop levels as risks. Heikin-Ashi may smooth price fluctuations but cannot eliminate false signals. The text suggests additional filters and profit-taking methods, while the actual rules rely on the moving averages and optional stop.

Key ideas

  • The strategy compares a faster EMA with a slower HMA to indicate trend direction.
  • An optional Heikin-Ashi price series can be used to calculate both averages.
  • The source opens long positions when the EMA is above the HMA and closes profitable positions when the relationship reverses.
  • A configurable percentage stop can close losing long positions.
  • The supplied backtest settings are not accompanied by performance results, and ranging markets may generate poor signals.

Tags

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