SMA Crossover Strategy with Equity-Based Position Sizing and Leverage Controls
Summary
This strategy uses a simple moving average of closing prices to define crossover entries: a move above the average triggers a long signal, and a move below triggers a short signal. Its configurable average length controls the lookback. Users can allow both directions or restrict trading to long-only or short-only; in restricted modes, the opposite crossover closes the existing position without opening a trade in the other direction.
Position quantities are calculated from current strategy equity, the selected leverage multiplier for that side, and the closing price. The script also plots a colored average, signal labels, and background shading to show the price’s position relative to the average. The accompanying description frames the method for Bitcoin on a daily chart but says it can be adapted; it supplies no performance results or comparative evidence. Commissions and slippage are omitted, so reported backtest behavior would not include those costs, and the document does not establish that the approach has an edge.
Key ideas
- A close crossing above the SMA triggers a long signal, while a crossing below triggers a short signal.
- The SMA lookback and allowed trade directions are configurable.
- Position size scales with current strategy equity and a separate leverage setting for longs and shorts.
- In long-only or short-only mode, an opposite signal closes the position without opening the other direction.
- The described backtest logic omits commissions and slippage, so it does not represent cost-adjusted performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.