Skip to content
All library documents

Moving Average Trend Signals and Percentage-Based Exits

Article Strategy library · Author: ChaoZhang

Summary

The document outlines a moving-average approach using 20-, 60-, and 120-period simple averages to classify aligned trends. It describes entering long when the shorter average crosses above the medium average and short when it crosses below, with the 60-period average serving as a reference for exits. The accompanying code instead triggers entries when price crosses the 60-period average and closes positions at a 300% gain or a 10% loss; it does not use the stated average alignment to gate entries.

A BTC/USDT futures backtest is configured for daily bars from February 2023 to February 2024, but no performance results are supplied. The document identifies repeated crossover trades in range-bound conditions and sensitivity to exit parameters as risks. The unusually large profit threshold and the differences between the written rules and code make the method difficult to assess as presented; no evidence establishes its profitability.

Key ideas

  • The written trend filter treats 20-, 60-, and 120-period averages aligned in order as directional signals.
  • The description proposes entering on a 20-period and 60-period moving-average crossover.
  • The supplied code instead enters when price crosses the 60-period average and does not apply the stated trend filter.
  • The code closes positions at a 300% gain or a 10% loss, and the backtest settings include no reported results.

Tags

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