MACD Crossover Entries with EMA–SMA Trend and ATR Stop Filters
Summary
This is a long-only MACD strategy that enters when the MACD line crosses above its signal line while a trend ribbon shows the EMA above the SMA for the same period. The MACD uses configurable fast and slow lengths, source price, and signal smoothing; the oscillator and signal can each use simple or exponential averages. The code also sets two partial profit-taking orders and closes the position when price falls below the recorded entry price minus an ATR-based stop distance.
The source lists default indicator and exit parameters and permits a configurable backtest date range, but it includes no performance results or market-specific backtest settings. The stop is based on the entry signal’s closing price and ATR calculation, so the document does not establish that it trails price or adapts to later volatility. The strategy is long-only, and its partial profit quantities and pyramiding setting require careful interpretation and independent testing before drawing conclusions about exposure or risk.
Key ideas
- A long entry requires a bullish MACD–signal crossover and an EMA above an SMA of the same trend period.
- MACD inputs allow different price sources and simple or exponential smoothing choices.
- Two limit orders take partial profits at separate price levels.
- The exit condition closes longs when price moves below the recorded entry close by an ATR-multiple distance.
- The document provides no reported performance results or backtest market specification.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.