MACD Trend Following Backtest in Crypto: Fees, Slippage and Break-Even Costs
MACD trend-following enters on line crosses and rides trends. Late signals and whipsaws in ranges are the two costs that decide the result.
Short answer
A MACD trend-following strategy (enter on MACD crossing its signal line or zero, exit on the opposite cross) is late by design, since MACD uses moving averages of price. It loses repeatedly in ranges through whipsaws and makes money in sustained trends. Break-even cost is its gross per-trade average; additionally measure how many trades are whipsaws (exits within a few bars at a loss). Use closed-bar crossovers only, next-bar fills, and funding if held on perpetuals.
Cost picture
| Item | Value (illustrative) |
|---|---|
| Trades | 220 |
| Gross avg per trade | +0.30% |
| Fees (2 × 0.05%) | −0.10% |
| Slippage (2 × 0.03%) | −0.06% |
| Net avg per trade | +0.14% |
| Break-even round-trip cost | 0.30% |
Review MACD Trend Following Backtest in Crypto with bar replay before using it live.
Open ChartsPod replayMeasuring whipsaws
| Trade type | Share (illustrative) | Avg result |
|---|---|---|
| Whipsaw (exit < 5 bars) | 48% | −0.6% |
| Normal | 40% | +0.4% |
| Trend capture | 12% | +4.5% |
Conclusion
Related: MACD Crossover Before Candle Close: Why the Signal Can Vanish, Parameter Optimization: Report All Trials, Not Just the Winning Curve.
Report break-even cost and whipsaw share for MACD trend backtests, and test any filter out of sample.
Put MACD Trend Following Backtest in Crypto next to price, flow and positioning in one workspace.
Open a ChartsPod workspaceQuestions readers ask
Why does MACD lose in ranges?
Repeated crossovers produce small losing trades.
Should I use intrabar crossovers?
No; use closed bars to match history.
Do filters fix it?
They can help but add parameters; test out of sample.
Sources and methodology
Backtest cost logic follows TradingView's Pine Script strategy documentation; indicator definitions are standard. All performance numbers are illustrative examples of the method, not results of real tests.
- TradingView Pine Script: Strategies — simulated fills and assumptions.
- TradingView Pine Script: Repainting — live vs historical calculation.
- ChartsPod documentation — guides for order flow, derivatives, alerts, backtests, journal and workspaces.
This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.
CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.