Skip to content
All library documents

Dual Moving Average Crossovers for Trend Following

Article Strategy library · Author: ChaoZhang

Summary

This note explains a trend-following strategy that compares a faster moving average with a slower one. A cross above signals a long entry; a cross below opens a short position when shorting is enabled, or closes the long otherwise. It describes simple, exponential, weighted, and relative moving averages, with default lengths of 14 and 28 periods.

The document outlines the approach’s fit with trending markets and its tendency to generate repeated trades and losses in sideways conditions. It suggests testing filters such as ATR, setting stop-loss and take-profit levels, and adjusting parameters while guarding against overfitting. The published backtest settings specify BTC-USDT futures over a short historical interval, but no performance results are reported. The source code also defines the slow-average type input with the same label as the fast-average input, a detail to check when configuring the strategy.

Key ideas

  • A fast average crossing above a slow average triggers a long entry.
  • A cross below triggers a short entry when shorting is enabled, or closes the long position otherwise.
  • The strategy offers four moving-average types and adjustable period lengths.
  • Sideways markets can produce repeated signals, trading costs, and consecutive losses.
  • Parameter tuning and added filters require out-of-sample checks to reduce overfitting risk.

Tags

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