Skip to content
All library documents

SMA Crossover Trend Following with Short and Long Moving Averages

Article Strategy library · Author: ChaoZhang

Summary

This document describes a simple trend following strategy based on crossovers among short and long simple moving averages. It lists 5, 20, and 200 period averages, and illustrates entries with the 5 period average crossing the 200 period average: an upward cross signals a long entry and a downward cross signals an exit or sell signal. The source configuration also includes 10, 50, and 130 period averages, though the described trading rule focuses on the 5 and 200 period pair.

The discussion says crossovers can help capture broad trends and are straightforward to implement. It warns that sideways markets can produce repeated false signals and trading costs, that results depend on period selection, and that large shocks can cause substantial losses. Suggested refinements include adding indicators such as MACD, KDJ, or ADX, adapting moving average lengths to volatility, and applying the approach across instruments. Published settings describe a short BTC/USDT futures backtest window, but provide no performance results. The sample code also appears to close an order labeled differently from its long entry, so implementation details merit review.

Key ideas

  • An upward crossover of the short moving average above the long average is treated as a buy signal.
  • A downward crossover is treated as a sell or exit signal.
  • The method aims to follow persistent trends but can trade repeatedly during range bound markets.
  • Moving average periods may need to vary by instrument and market conditions.
  • The document provides backtest settings but no performance statistics.

Tags

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