Skip to content
All library documents

Price Crossovers with a 21-Period SMA and Longer-Term Averages

Article Strategy library · Author: ChaoZhang

Summary

This simple moving-average system enters a long position when price crosses above a 21-period SMA and closes it when price crosses below. It also calculates 50-period and 200-period SMAs as broader trend references, although the described entry and exit rules do not use those longer averages as filters. The document presents the method as straightforward to automate and adjustable through changes to the SMA periods.

Its main limitation is whipsaw: in a range, price can cross the average repeatedly and produce unnecessary trades. Suggested refinements include testing alternative periods, adding confirmation indicators or breakout conditions, and using stop-loss rules. The published backtest settings specify daily BTC/USDT futures data from February 2023 to February 2024, but no performance results are given. The source also requests daily data with lookahead enabled and sets date filter inputs that are not applied in the shown logic. These implementation details limit what can be concluded about the strategy's behavior or test validity from the document alone.

Key ideas

  • A price cross above the 21-period SMA opens a long position, and a cross below closes it.
  • The 50-period and 200-period SMAs are calculated as broader trend references.
  • Frequent crossovers in sideways markets can lead to whipsaw trades.
  • The document proposes parameter testing, signal filters, and stop-loss rules as refinements.
  • The published backtest settings provide no reported performance results.

Tags

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