Daily SMA Crossover Strategy with Four- and Thirty-Day Averages
Summary
This simple long-only moving-average strategy compares the closing-price four-period simple moving average with the thirty-period average, with the script intended for daily charts. It opens a long position when the shorter average crosses above the longer one and closes the position when it crosses below. Signals and orders are evaluated at bar close, and the strategy allows only one position at a time, using the full available equity according to its settings.
The document provides rules and source code, but no backtest period, asset specification, or performance results. It includes no stop loss, profit target, or additional trend filter, so exposure remains until a bearish crossover. A moving-average crossover can lag price changes and may generate repeated entries and exits in sideways markets; the document does not quantify these effects or include trading costs. The rules therefore describe a baseline trend-following example rather than evidence of an effective trading system.
Key ideas
- A bullish crossover occurs when the four-period average rises above the thirty-period average.
- The strategy opens a full-equity long position on a bullish crossover and closes it on a bearish crossover.
- Orders are processed at bar close, and the code is intended for daily charts.
- The rules do not specify protective stops, profit targets, or filters for sideways conditions.
- The document provides no asset-specific backtest or performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.