Skip to content
All library documents

Long-Only EMA Golden Cross with Volatility and Trailing Exits

Article Strategy library · Author: ChaoZhang

Summary

This long-only trend strategy uses a long-term EMA as a market filter and a short-term EMA above a medium-term EMA as the stated bullish confirmation. The source code enters when price is above the long-term average and the short average is above the medium average; it does not require a fresh crossover at entry, despite the golden-cross description. An optional volatility filter requires ATR to exceed a threshold based on its own moving average. Exits can be triggered by a downward short-to-medium EMA cross or a percentage trailing stop.

Inputs include EMA periods, ATR settings, and trailing-stop controls. The published BTC/USDT futures backtest configuration covers January 2024, but no outcome data is supplied. The document identifies reversal exposure and frequent trading from unsuitable EMA settings as risks, and proposes position sizing and additional stop rules. The code calculates a close-below-long-EMA condition but does not use it as an exit, and its ATR filter and exits should be checked against the intended rules. The description alone does not demonstrate effectiveness or the claimed level of risk control.

Key ideas

  • The entry condition requires price above the long-term EMA and the short EMA above the medium EMA.
  • The source does not require a new golden cross at the moment of entry.
  • An optional ATR filter compares current ATR with a scaled average ATR threshold.
  • Exits can use a short-to-medium EMA cross or a percentage trailing stop.
  • The backtest settings include no performance results, and some described conditions are unused in the source.

Tags

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