Skip to content
All library documents

Thirty- and 200-Day Moving Average Crossovers for Gold

Article Strategy library · Author: ChaoZhang

Summary

The described approach trades XAUUSD using a short and long simple moving average. A cross of the 30-period average above the 200-period average signals a long position, while a cross below signals a short position. The accompanying code also plots a 60-period average, though it does not use that line to generate signals. Exits include fixed-distance stop and target orders, with an opposite crossover closing the existing position and reversing direction.

The text presents the method as a straightforward trend-following system and discusses lag, whipsaw signals, stop placement, and drawdown as risks. It suggests parameter changes, additional filters, and position sizing as possible extensions. The published backtest settings specify a one-month period on a Binance BTC/USDT futures market, which does not match the text’s focus on gold; no backtest results are reported. The code and description also differ in how the stop distance is expressed, so the intended price-unit interpretation requires care.

Key ideas

  • A 30-period simple moving average crossing the 200-period average defines the directional signals.
  • Opposite crosses close existing trades and can initiate positions in the other direction.
  • The code specifies fixed-distance stops and targets, but the text and implementation leave their price units ambiguous.
  • The listed backtest settings concern BTC/USDT futures rather than the gold instrument discussed in the prose.
  • The document describes risks and possible refinements but gives no performance evidence.

Tags

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