Skip to content
All library documents

Dual Moving Average Crossovers with Selectable Averages and Price Inputs

Article Strategy library · Author: ChaoZhang

Summary

This trend-following method enters long when a short-period moving average crosses above a longer-period average and closes the long when the short average crosses back below. The implementation lets the user choose among simple, exponential, double or triple exponential, weighted, and volume-weighted averages. It also offers several price inputs, including close, high, low, open, typical, and midpoint prices. The supplied configuration shows a BTC/USDT futures backtest over about a year, but the document reports no returns, drawdowns, or trade statistics.

The explanation emphasizes that the shorter average reacts faster while the longer average smooths price movement, so crossover signals lag and can be late. In sideways markets, repeated crossings can generate trades and costs without a sustained trend. The implementation shown opens and closes long positions; it does not include a short-entry rule, despite the general description of buy and sell signals. No stop-loss, take-profit, or execution-cost model is specified. The document suggests trend filters and risk controls as possible extensions, not tested features of the shown strategy.

Key ideas

  • A short-period average crossing above the long-period average opens a long trade; a downward cross closes it.
  • The implementation supports six moving-average types and multiple price inputs.
  • Moving-average lag can delay entries and exits, while sideways markets can produce repeated signals.
  • The shown code specifies long trades only and includes no stated stop-loss or take-profit rule.
  • The backtest configuration is provided without performance statistics or evidence of profitability.

Tags

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