Skip to content
All library documents

Modulo Signals Filtered by an EMA Trend and Stop Rules

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses a modulo condition on a selected price series as an entry filter, then uses the price's relationship to an exponential moving average to choose direction. With the filter enabled, a signal occurs when the selected input divided by a configurable divisor has zero remainder; prices above the EMA lead to long entries and prices below it to short entries. The document also describes optional fixed, swing-based, or ATR-based stops, risk-reward take-profit levels, trailing stops, and direct position reversals.

The default settings include a divisor of 4 and an EMA length of 70 periods, with a BTC/USDT futures backtest configuration covering a stated period. No performance statistics or test conclusions are supplied. The modulo condition's behavior depends on the numeric price representation and can be rare or inconsistent across instruments, so its purported randomness filter needs careful validation. The EMA can lag, and frequent reversals or poorly chosen parameters can raise trading costs. The document recommends further testing but does not provide evidence that the method is profitable.

Key ideas

  • A zero remainder from dividing the selected price input by a divisor gates entries when modulo logic is enabled.
  • The price's position relative to the EMA determines whether a gated signal opens long or short.
  • Optional exits include fixed, swing-based, and ATR-based stops, take-profit rules, and trailing stops.
  • Direct reversals are configurable and may increase position changes and trading costs.
  • The document supplies settings and a backtest configuration but no performance results.

Tags

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