EMA 5/13 Crossover Strategy for Long and Short Positions
Summary
This script trades both directions using a crossover between a 5-period and a 13-period exponential moving average of closing prices. When the faster EMA crosses above the slower EMA, it closes any short position and enters long. When the faster EMA crosses below the slower EMA, it closes any long position and enters short. The script sizes trades at 100% of strategy equity and does not add a separate stop-loss, profit target, indicator filter, or chart plot for the averages.
The document is a brief open-source script listing with an April 13 date, but it gives no year, market, timeframe, backtest period, or strategy performance statistics. Its simplicity makes the signal rules easy to inspect, while also leaving the approach exposed to whipsaws during sideways price action. The listing provides no evidence that the stated sizing or crossover rules are suitable for any particular instrument or account.
Key ideas
- The strategy uses a 5-period EMA crossing a 13-period EMA to generate directional signals.
- An upward cross closes a short and opens a long; a downward cross closes a long and opens a short.
- The script specifies position size as 100% of strategy equity.
- No separate stop, profit target, trend filter, market, timeframe, or backtest results are supplied.
- Crossover rules can repeatedly reverse during sideways markets, and the document offers no performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.