Skip to content
All library documents

Candlestick Retracement Entries with an EMA Trend Filter

Article Strategy library · Author: ChaoZhang

Summary

The prose presents a triple-EMA breakout strategy: it describes 20-, 50-, and 200-period trend references, a short- versus medium-term EMA crossover, and a follow-through candle that confirms a breakout. It warns that moving-average signals can whipsaw in ranging markets, overlook costs, and need instrument-specific testing.

However, the supplied code does not implement the described triple-EMA crossover. It detects two-bar candle patterns, gates long and short setups against the 200-period EMA unless that filter is disabled, and places limit orders at retracement levels calculated between candle highs and lows. Although take-profit and stop parameters are entered and displayed, the actual exit orders use the current candle extreme as the limit and the calculated stop; the displayed take-profit level is not used in those orders. Published settings identify BTC/USDT futures, but no performance results are reported, so the prose’s strategy description and the code should not be treated as a single verified method.

Key ideas

  • The narrative describes EMA crossover entries confirmed by a follow-through candle, but the supplied code uses candle patterns and retracement limit orders.
  • The code uses a 200-period EMA as a directional filter unless the filter is disabled.
  • Entry, stop, and displayed target levels are derived from candle ranges and configurable level values.
  • The configured take-profit level is displayed but does not appear in the submitted exit orders.
  • The stated risks include whipsaws in sideways markets and unaccounted trading costs; no results are reported.

Tags

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