EMA Crossover Entries with RSI Filters and ATR-Based Risk Sizing
Summary
This beginner-oriented script describes a long-only trend and risk model. It uses a 9-period and 21-period exponential moving average (EMA); a bullish crossover triggers a possible entry when RSI is between its stated oversold and overbought thresholds. A bearish crossover or an overbought RSI reading triggers an exit. The script calculates an ATR stop distance, sets a take-profit distance as a multiple of ATR, and estimates quantity from equity risked per trade divided by that stop distance. Defaults include a 14-period RSI and ATR, a 2:1 reward-to-risk setting, and 1% risk per trade.
The source includes a 0.05% commission assumption, chart labels, alerts, and a position-size estimate. It does not provide a strategy report or performance results in the supplied text. The sizing formula floors quantity to whole units, and the stated stop and target are calculated from the signal bar's close. The document is therefore an example of rule construction, not evidence that the approach is profitable; the shown RSI filter also does not require a separate oversold recovery signal.
Key ideas
- A fast and slow EMA crossover defines bullish entries and bearish exits.
- Entries are filtered by RSI values between the stated overbought and oversold thresholds.
- ATR sets the stop distance, while a configurable multiple sets the profit target distance.
- Position size is estimated from equity, a risk percentage, and the ATR stop distance.
- The supplied text gives code and assumptions but reports no strategy performance results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.