BACKTESTING · MACD TREND

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

ItemValue (illustrative)
Trades220
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 cost0.30%
MACD trend following: edge vs cost (%)MACD trend following: edge vs cost (%): Gross edge 0.30 %; Fees 0.10 %; Fees + slippage 0.16 %.MACD TREND FOLLOWING: EDGE VS COST (%)Gross edge0.30 %Fees0.10 %Fees + slippage0.16 %
Edge per trade versus cost per trade. Original ChartsPod editorial graphic.

Review MACD Trend Following Backtest in Crypto with bar replay before using it live.

Open ChartsPod replay

Measuring whipsaws

Trade typeShare (illustrative)Avg result
Whipsaw (exit < 5 bars)48%−0.6%
Normal40%+0.4%
Trend capture12%+4.5%
Filters against whipsawsFilters against whipsaws. Left, Common filters: MACD above/below zero only; Higher timeframe trend agree; Minimum histogram size; ADX above threshold. Right, Cost of filters: Fewer trades; Later entries; New parameters to overfit; Need out-of-sample test.COMMON FILTERSMACD above/below zero onlyHigher timeframe trend agreeMinimum histogram sizeADX above thresholdCOST OF FILTERSFewer tradesLater entriesNew parameters to overfitNeed out-of-sample test
Every filter is a new parameter. Original ChartsPod editorial graphic.

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 workspace

Questions 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.

  1. TradingView Pine Script: Strategies — simulated fills and assumptions.
  2. TradingView Pine Script: Repainting — live vs historical calculation.
  3. 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.