MACD Trend Entries with EMA, ADX, Volume, and Trailing Profit Exits
Summary
This strategy combines MACD signals with directional and market-condition filters. Longs require price above a rising trend EMA, while shorts require price below a falling EMA; optional ADX and relative-volume filters screen for stronger conditions. A recent MACD cross can authorize entries for a limited number of bars, and continuation entries can instead trigger when price breaks a short-term high or low while MACD remains aligned. A cooldown limits how quickly new positions may be opened.
For exits, the script tracks the highest close-based open profit and can close after profit falls from that peak. The giveback can be measured proportionally or in percentage points, and the trailing exit arms after a minimum peak profit. It also includes an ATR-based emergency stop and an optional MACD reversal exit. The available excerpt does not show all order logic, and supplies no performance results. Its settings, close-based tracking, and indicator rules require asset- and timeframe-specific evaluation, including realistic costs and execution assumptions.
Key ideas
- A trend EMA and its slope set the permitted direction for long and short entries.
- ADX and relative volume can filter out weak or inactive market conditions.
- MACD crosses remain valid for a configurable window, while continuation signals use recent price structure.
- The trailing exit tracks close-based peak profit and allows either proportional or fixed-point giveback.
- An ATR emergency stop and optional MACD reversal exit provide additional risk controls.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.