A 10/200 SMA Crossover with Percentage-Based Exits
Summary
This document presents a simple moving-average crossover strategy. It defines a fast 10-period simple moving average and a slow 200-period simple moving average. A cross of the fast average above the slow average triggers a long entry and buy alert; a cross below triggers a short entry and sell alert. The script also plots markers at crossover bars.
For open long positions, the source sets a stop at 5% below the average position price and a limit at 5% above it. For shorts, those levels are reversed. The document contains no explanatory discussion, market selection, backtest configuration, or reported performance, so it offers no evidence about how the rules behave across assets or regimes. The code is labeled as a study while also calling strategy functions, which may require adjustment to run as intended. It should be read as a compact teaching example rather than a validated trading system.
Key ideas
- The strategy uses 10-period and 200-period simple moving averages.
- An upward crossover triggers a long entry and a buy alert.
- A downward crossover triggers a short entry and a sell alert.
- Exit levels are placed 5% from the average position price in the favorable and adverse directions.
- The document provides no backtest evidence or market-specific evaluation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.