EMA Crossover Entries with Candle-Based Stops and Trend Exits
Summary
This script uses a 9-period EMA and a 21-period EMA to generate directional entries: a bullish crossover opens a long position, while a bearish crossover opens a short position. The initial stop is set at the low or high of the crossover candle, depending on trade direction. It plots both averages and marks crossover bars on the chart.
Positions can also be closed when the averages cross back or when the slower EMA turns against the trade. The document describes the approach as suitable for backtesting and suggests manual order entry with tight stops, but it provides no backtest results or performance evidence. The stop and exit rules may respond differently across instruments and timeframes, and crossover signals can lag or whipsaw in sideways markets. Costs, position sizing, and parameter robustness are not assessed.
Key ideas
- A 9-period EMA crossing above a 21-period EMA triggers a long entry, while a downward cross triggers a short entry.
- The initial long or short stop is placed at the low or high of the crossover candle.
- A position may close on an opposite EMA cross or when the slower EMA turns against it.
- The document provides no performance results, so the strategy requires independent evaluation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.