Backtest the MA Cross 5/20 strategy on real crypto candles
The MA Cross 5/20 strategy is trend-following in its simplest form: go long when the 5-bar moving average crosses above the 20-bar, and exit when it crosses back below. It stays flat in downtrends and re-enters quickly after upturns, at the cost of whipsaw losses when price chops sideways.
This page loads the exact rules into the backtester — both moving averages are drawn on the chart and ENTRY/EXIT are the same CROSS() events the Indicator Lab marks visually. Orders fill at the next bar's open with your chosen fees and slippage, then the simulator reports the equity curve, Sharpe and Sortino ratios, max drawdown, profit factor and the complete trade list.
How it works
- Pick a trading pair, interval and number of bars.
- The strategy ENTRY/EXIT formulas load into the editor, fully editable.
- Set fees, slippage and optional stop-loss / take-profit.
- Run the simulation and inspect the equity curve, Sharpe/Sortino, drawdown and trade list.
Frequently asked questions
When does the MA Cross 5/20 backtest enter and exit trades?
It enters long on the bar where MA(C,5) crosses above MA(C,20) and exits when MA(C,20) crosses back above MA(C,5). The fill happens at the next bar's open — signals are only confirmed at bar close, so there is no look-ahead bias.
Is the moving-average crossover profitable on crypto?
It depends on the pair, interval and fee regime: crossovers capture large trends but bleed through small losses in ranging markets. That is exactly what this backtester quantifies — run it across several pairs and intervals, then use the Multi-Coin Scanner to check how the rule performs out of sample.
More strategy backtester pages
MACD Cross · RSI 30/70 · Bollinger Breakout · KDJ Cross · Donchian 20/10 · Trend Dip · Capitulation Reversal · Net Flow Trend · Trend Ignition
Related tools
Moving Averages in the Indicator Lab · MA Cross Signals in the Indicator Lab