Skip to content
All library documents

Simple Moving Average Crossovers with Prior-Bar Stop Levels

Article Strategy library · Author: ChaoZhang

Summary

This simple trend-following system uses 9 and 45 period simple moving averages. It enters long when price crosses above both averages and short when price crosses below both, then uses an opposing signal to exit with a stop level based on the prior bar’s low or high. The document also describes plotting crossover signals and gives a BTC/USDT futures backtest configuration.

No backtest performance results are reported. The text notes that moving average systems can whipsaw in sideways markets and that parameter choices affect trade frequency. It suggests testing alternate averages, volatility filters, trailing stops, and support or resistance context. There is also a material implementation concern: the supplied code requests prior daily high and low with lookahead enabled, which can introduce future data into historical results. That setting should be corrected and the exit behavior verified before drawing conclusions from a backtest.

Key ideas

  • The strategy enters when price crosses above or below both the fast and slow simple moving averages.
  • The averages use 9 and 45 periods, respectively.
  • An opposing signal triggers an exit using the previous daily low or high as a stop reference.
  • Sideways markets can create repeated false signals, and parameter choices affect trading frequency.
  • The provided stop data request uses lookahead, which can bias historical evaluation.

Tags

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