Skip to content
All library documents

EMA Crossover Entries and Exits with Configurable Position Sizing

Article Strategy library · Author: 区班量化

Summary

This educational moving-average strategy uses separate EMA crossover settings for entries and exits. It opens a long position after the entry crossover persists for a configured observation period, sizing the purchase as a fraction of available cash. While long, it monitors a second crossover pair and sells the holdings when the exit condition is met. Parameters include entry and exit periods, position ratio, a stop-loss ratio, and polling interval.

The published backtest settings specify ETH/USDT on OKEX with daily data from January to October 2019, along with fee and execution-mode inputs, but no performance results are supplied. Although a stop-loss ratio is listed as a parameter, the shown trading logic does not apply it; the strategy code instead exits through the crossover condition. The document itself frames the example as instructional and advises caution in live use. Its single market and historical test configuration cannot establish robustness across assets or regimes.

Key ideas

  • Entry and exit signals use separate pairs of EMA periods and observation thresholds.
  • The example opens long positions using a configurable fraction of available cash.
  • The displayed exit logic sells holdings when the exit crossover condition is met.
  • A stop-loss ratio is listed as a parameter but is not used in the shown logic.
  • The historical test settings are limited to one market and include no reported results.

Tags

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