Combining a 2/20 EMA Signal with Displaced Three-Line Averages
Summary
This script combines two moving-average methods into a single directional signal. One component compares price behavior with an exponential moving average, using the prior two bars’ highs and lows to assign a bullish or bearish state. The other uses three simple averages of median price, with default lengths of 13, 8, and 5 and displacements of 8, 5, and 3 bars. It turns bullish when price and the three averages align upward, and bearish when they align downward.
A position is taken only when both components agree; an optional reverse setting flips the direction. The script closes positions when neither combined signal is active and colors bars by signal state. It includes a start-date filter and configurable average lengths, but no reported performance results or explicit stop-loss or target rules. The source describes the script as educational and focused partly on bar coloring, so its signals should not be mistaken for evidence of profitability or a complete risk-managed system.
Key ideas
- The script combines a price-relative EMA state with alignment among three displaced simple averages.
- The three-line component uses median price and defaults to lengths of 13, 8, and 5 with displacements of 8, 5, and 3 bars.
- Trades are opened only when both components point in the same direction, with an option to reverse signals.
- The script closes positions when the combined signal is neutral and provides no explicit stop or target rules.
- No performance evidence is supplied, and the source frames the indicator as educational.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.