EMA Trend Filter with Multi-Timeframe Stochastic Entries and ATR Exits
Summary
This strategy combines a fast and slow EMA trend filter with stochastic timing signals calculated on both the chart timeframe and a higher timeframe. The provided settings use EMA lengths of 38 and 62 and an 11-period stochastic with smoothing. Long signals require the higher-timeframe stochastic to cross above its midpoint while the local stochastic confirms upward strength; shorts use the corresponding downward conditions. A setting controls whether the EMA trend must agree, and another limits trading direction.
The excerpt begins a staged exit system: an initial ATR stop, a move to breakeven after a specified gain, ATR-based trailing, an optional exit when the EMA trend flips, and a maximum holding period. However, the source ends partway through the exit settings, so the full mechanics and order handling are unavailable. The document includes code and configuration but no backtest results or market-specific evidence. Its usefulness is therefore as a rule template; signal behavior and risk depend on timeframe, settings, execution costs, and details absent from the excerpt.
Key ideas
- The relative ordering of fast and slow EMAs supplies an optional directional filter.
- Entries combine a higher-timeframe stochastic midpoint cross with local stochastic direction and confirmation.
- The script allows both directions, long-only trading, or short-only trading.
- The visible exit settings describe ATR stops, breakeven adjustment, trailing stops, trend-flip exits, and a time limit.
- The excerpt is incomplete and provides no backtest results, so strategy performance cannot be assessed from it.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.