EMA Crossover Trading with Partial Profits and Dollar-Based Trailing Exits
Summary
This script trades crossovers between fast and slow exponential moving averages, entering long on an upward cross and short on a downward cross. Trades can be restricted to the 15-minute chart and weekdays. It sizes entries at the configured full-equity percentage, with the strategy settings also specifying margin parameters. Exit logic takes a configurable portion off at the first dollar-based profit threshold, then manages the remaining position with a further profit target, stop loss, and trailing exit, with dollar distances converted to ticks.
The document’s brief description says the method follows EMA direction and seeks swing moves, but it supplies no backtest results, instrument definition, or evidence that the settings are broadly suitable. Its header specifies example dollar thresholds, while inputs allow them to be changed. Full-equity sizing and fixed dollar exits make results sensitive to instrument price scale, tick size, leverage, costs, and volatility. The script disables intrabar recalculation, so its simulated order behavior may not capture all real-time price paths.
Key ideas
- An upward or downward fast/slow EMA crossover triggers long or short entries, subject to optional timeframe and weekday filters.
- The initial position uses the configured full-equity sizing setting.
- A partial exit is followed by a further target, stop loss, and trailing exit whose distances are specified in dollars and converted to ticks.
- The document provides no performance evidence, and fixed dollar thresholds and equity sizing may behave differently across instruments and market conditions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.