Skip to content
All library documents

EMA Trend Alignment and Candlestick Pattern Recognition with Stochastic Filters

Article Strategy library · Author: teabit168

Summary

This script combines three exponential moving averages with a stochastic oscillator and a set of candlestick pattern definitions. It classifies the trend as bullish when price and the three averages are ordered upward, and bearish when they are ordered downward. The stochastic marks overbought or oversold conditions when either its %K or %D line crosses the stated boundary. The code also calculates average true range and average candle body to define doji and unusually large-bodied candles.

The visible source defines bullish and bearish patterns including hammers, stars, engulfing candles, pin bars, marubozu, and tweezers. However, the provided excerpt ends during the bearish pattern definitions and does not show how these conditions become entries, exits, or position sizing rules. Although the page includes a strategy-report heading, it gives no performance results. Pattern labels depend on the specific formulas used here, and this excerpt alone does not establish whether the combined approach is profitable or robust.

Key ideas

  • The trend filter requires price and fast, medium, and slow EMAs to be strictly aligned.
  • The stochastic flags overbought or oversold states when either smoothed line crosses its threshold.
  • Candle classifications use body size, wick proportions, prior candles, and an ATR-based comparison.
  • The script defines multiple bullish and bearish reversal or continuation patterns.
  • The excerpt does not show trading rules or report strategy performance.

Tags

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