Skip to content
All library documents

EMA Cross Signals Filtered by Recent Price Highs and Lows

Article Strategy library · Author: ChaoZhang

Summary

This simple rule-based trading strategy uses a 20-period EMA as a trend reference and also plots recent closing-price highs and lows. Its description presents moves above or below the EMA as directional cues, with price action relative to the day's high and low intended to filter entries. The source instead implements entries when price crosses the EMA and its prior close rose or fell, placing long or short orders accordingly. That difference between the prose and executable rules matters when reproducing the method.

The document provides source code and a backtest configuration for BTC-USDT futures using a four-hour period over one month, but it gives no performance results. It cautions that EMA signals lag during sharp moves, filters can remove valid trades, and technical rules do not account for company fundamentals or other news. The asset configuration is a futures contract even though the description calls this a stock strategy. Parameter changes and additional filters are suggested, but no tests establish that they improve results.

Key ideas

  • The method uses a 20-period EMA as its central trend indicator.
  • The prose describes EMA direction and intraday extremes as filters, while the source uses EMA crosses and the previous close's direction.
  • The published backtest settings specify BTC-USDT futures on a four-hour interval for about one month.
  • No performance results are supplied, and the described rules may lag or filter out valid signals.
  • The stock framing conflicts with the futures instrument in the backtest configuration.

Tags

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