Skip to content
All library documents

Configurable EMA Stack Strategy with Alignment Filters

Article Strategy library · Author: E_M_C_S

Summary

This script builds a strategy around six configurable exponential moving averages, with default lengths of 5, 20, 50, 90, 140, and 200 periods. Users can separately control which averages appear on the chart and which participate in a directional bias filter. The filter checks whether the selected averages are strictly ordered from fastest to slowest for bullish or bearish alignment. The visible logic also defines fast alignment using the first two averages when both are enabled, and signals are intended to account for both a crossover and bias becoming active while the fast averages are already aligned.

The excerpt ends before the entry and exit rules are complete, so the full trade management logic cannot be assessed. It specifies no market or timeframe, and it gives no performance evidence. Although the strategy declaration includes commission and slippage assumptions, those settings alone do not establish profitability or robustness. Customizing lengths and enabled averages changes the filter’s behavior and would require evaluation across suitable data and market conditions.

Key ideas

  • The strategy calculates six EMAs with configurable lengths and independent display controls.
  • Users choose which EMAs must participate in the bullish or bearish alignment filter.
  • Bullish and bearish bias require strict ordering among the selected averages.
  • The visible signal design considers EMA crossovers and bias changes while already aligned.
  • The supplied excerpt omits the complete entries and exits, so results and trade management cannot be assessed.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.