Skip to content
All library documents

Trend Signals from Crosses of 20-Period SMA and 21-Period EMA

Article Strategy library · Author: ChaoZhang

Summary

This strategy builds two reference lines from a 20-period simple moving average (SMA) and a 21-period exponential moving average (EMA). At each point, it labels the higher average as the bullish reference and the lower average as the bearish reference. A close crossing above the higher line triggers a long entry, while a close crossing below the lower line triggers a short entry. If a position in the opposite direction is open, it is closed before the new entry.

The document describes the approach as trend following and notes that moving-average signals can lag and produce repeated trades in choppy markets. It suggests parameter testing and possible additions such as other indicators, stop and target rules, and position management. The published settings specify BTC/USDT futures over a short test period, but provide no performance results. Despite the strategy name, the described rules calculate moving averages rather than Bollinger Bands, and no separate stop-loss or take-profit rule is implemented in the source.

Key ideas

  • The strategy calculates a 20-period SMA and a 21-period EMA, then orders them into upper and lower reference lines.
  • A close crossing above the upper line opens a long, while a cross below the lower line opens a short.
  • An opposite position is closed when a new directional signal occurs.
  • Moving-average lag and choppy-market whipsaws are stated risks.
  • The source contains no explicit stop-loss or take-profit orders, and the published settings report no results.

Tags

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