Skip to content
All library documents

Dual Moving Average Crossover Strategy with Trend Color Filters

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses fast and slow moving averages to determine whether to hold or close a long position. The baseline moving average is displayed with one of three color schemes: based on its direction, on the fast and slow average relationship, or on both conditions together. In the composite mode, a rising baseline and fast average above the slow average support entry; a falling baseline with the fast average below the slow average closes the position. The source code uses simple moving averages for these calculations, despite offering a selectable moving-average type.

The document provides configurable lengths and dates, plus a BTC/USDT futures backtest setup, but gives no results to demonstrate effectiveness. It warns that crossovers can whipsaw in choppy markets and that parameter choice affects behavior. The source implements long entries and exits, not short positions, and includes no explicit stop-loss. Color changes aid chart reading but do not independently improve signal quality; proposed filters and risk controls remain untested suggestions.

Key ideas

  • The strategy opens or maintains a long position using fast and slow moving-average relationships, with optional baseline direction confirmation.
  • Three display modes color the baseline according to direction, crossover, or both conditions.
  • Although the interface offers a moving-average type selector, the source code calculates simple moving averages.
  • The example includes BTC/USDT futures backtest settings but no reported performance results.
  • The rules can whipsaw in sideways markets and contain no explicit stop-loss or short-entry logic.

Tags

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