Building a Multi-Asset Crypto Spot Strategy with Double EMAs
Summary
This tutorial presents a multi-pair spot trading example based on two exponential moving averages. A bullish crossover of the faster average above the slower one prompts a buy, while a bearish crossover prompts a sale. Each trading pair can have its own EMA periods and order amount, configured as parallel comma-separated parameter lists. The program cycles through the pairs, calculates indicators from candle data, and checks for crossover conditions on completed bars.
The implementation also demonstrates order cancellation, balance and profit tracking, persistent state across restarts, chart updates, and a status table. Its example backtest reports trades triggered for several assets, and the text mentions simulation testing. Those demonstrations show how the code operates, not whether the approach is profitable: no return statistics, benchmark, or robustness analysis is supplied. The article labels the strategy as a learning example and advises caution in live deployment. Its performance would depend on chosen periods, trading costs, order handling, and market conditions.
Key ideas
- A fast and slow EMA crossover provides the example strategy’s buy and sell signals.
- Each monitored pair can use its own EMA periods and order size.
- The program loops through pairs and evaluates crossover conditions using candle data.
- The implementation tracks balances, estimated profit, chart data, and trade state across restarts.
- Illustrative backtest activity is not evidence of profitability or robustness.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.