momentummedium-high riskBacktest as of 2026-09-29

MACD Crossover Strategy (Crypto)

Does a MACD crossover strategy work on crypto? Backtested on real Hyperliquid perps from 2024-08-15 to 2026-09-29, the default settings earned a Sharpe of 1.87 — +408.8% total return with a 33.3% worst drawdown across 2,746 trades in 1,142 positions, net of fees, slippage, and funding.

By Keel Research Team · Data as of 2026-09-29 · how this backtest was produced
EquityDrawdown
Sharpe
1.87
default settings
Total return
+408.8%
Worst drawdown
−33.3%
Trades
2,746

2024-08-15 → 2026-09-29 · net of fees, slippage, and funding · price-only Sharpe 2.00 · these are the default settings, not a hand-picked best case.

At $1,000, this strategy’s worst historical dip was about $333. Free account, your own Hyperliquid keys. Keel only trades.

How it works

How it works

This strategy trades the top-15 Hyperliquid perpetuals on four-hour bars. It goes long a coin when its MACD histogram (12/26/9) turns positive — a confirmed shift in momentum — and its price is above its 200-bar average, which keeps entries on the trending side. Otherwise it holds cash. Positions are equal-weight, 1x gross, long-or-flat, and it trades only when a position drifts 20% from target.

When it works best

Sustained, multi-day trends — exactly the legs the four-hour timeframe is quick enough to catch. The timeframe is the whole edge here: the identical rules run on daily bars barely break even, because by the time a daily MACD confirms, crypto's move is largely over. The MACD periods themselves make little difference. Over 2024-08-15 to 2026-09-29 the default four-hour settings returned +408.8% with a Sharpe of 1.87 and a maximum drawdown of −33.3%, net of fees, slippage, and funding.

When it struggles

Choppy, directionless markets, where the trend filter flips on and off and each entry gives back a little. It is long-or-flat, so it sits out downtrends rather than profiting from them, and drawdowns can run deep — the test window saw a −33.3% maximum. At 2,746 trades over the window, turnover is meaningful, so fees matter.

How it’s built

The exact strategy behind this backtest, with no black box. Fork it to change it and run your own backtest.

Configuration

Globalsconfig
target_timeframe4h
UniverseassetsTop by Volume · HL Perps · 15 assets15 resolved
Executionorders
rebalanceOn Change

Factories

trend_vs_200factory
Pipeline7 steps
PriceDataLoaderData Loader
ohlcvstore
Parallel2 branches
entries
Parallel2 branches
const
ConstantForecastForecast Mapper
value1
setup
Parallel2 branches
macd_up
MACDIndicator
fast_period12slow_period26signal_period9
AboveThresholdFilterSignal Transform
threshold0
uptrend
trend_vs_200call
AboveThresholdFilterSignal Transform
threshold0
MaskAndSignal Composer
ApplyMaskSignal Composer
score_signalconstfilter_signalsetup
macd_entrystore
exits
Parallel2 branches
const
ConstantForecastForecast Mapper
value1
cross_down
MACDIndicator
fast_period12slow_period26signal_period9
BelowThresholdFilterSignal Transform
threshold0
ApplyMaskSignal Composer
score_signalconstfilter_signalcross_down
macd_exitstore
TradeManagerPosition Manager
entriesmacd_entrypricesohlcv
Parallel1 branches
macd_cross_down
macd_exitload
ExitPosition Manager
ExposurePosition Manager
EqualWeightSizerPosition Sizer
target_leverage1max_weight0.2

Explore the settings

precomputed · updates instantly

Adjust a setting to see the exact backtested result, including the ones that lost money.

Complete 16-cell public cross-product on explicit resolved universes.

MACD periods
Signal timeframe
Pinned universe
Sharpe
1.87
Return
408.8%
Worst DD
−33.3%
Trades
2,746

At $1,000, these settings' worst historical dip was about $333. You land in the editor with this exact setup. Free account, your own keys.

Compare all 16 settings
MACD periodsSignal timeframePinned universeSharpeReturnWorst DDTrades
8/17/94hTop 8 coins1.36128.4%−27.3%1,020
8/17/94hTop 15 coins1.92422.3%−33.5%3,227
8/17/91dTop 8 coins0.4115.7%−30.1%89
8/17/91dTop 15 coins0.4219.8%−38.1%256
12/26/94hTop 8 coins1.18103.7%−27.5%798
12/26/94hTop 15 coinsdefault1.87408.8%−33.3%2,746
12/26/91dTop 8 coins0.225.3%−37.4%92
12/26/91dTop 15 coins0.4825.8%−46.9%248
19/39/94hTop 8 coins1.0589.0%−32.5%698
19/39/94hTop 15 coins1.61295.7%−33.7%2,314
19/39/91dTop 8 coins0.5221.1%−36.2%68
19/39/91dTop 15 coins0.9273.6%−47.8%187
24/52/184hTop 8 coins0.8464.7%−29.4%536
24/52/184hTop 15 coins1.17165.3%−40.4%1,848
24/52/181dTop 8 coins0.4215.8%−31.1%46
24/52/181dTop 15 coins0.8163.2%−39.6%151

The data

Monthly returns

MonthReturn
2024-080.0%
2024-09+14.5%
2024-10+6.0%
2024-11+72.2%
2024-12-9.7%
2025-01-1.1%
2025-02-5.1%
2025-03-9.3%
2025-04+11.7%
2025-05+3.4%
2025-06+1.1%
2025-07+6.9%
2025-08-1.5%
2025-09+29.4%
2025-10-3.4%
2025-11-2.5%
2025-12+3.2%
2026-01+30.9%
2026-02+10.9%
2026-03-0.8%
2026-04-4.2%
2026-05+26.6%
2026-06-12.0%
2026-07-6.0%
2026-08+20.8%
2026-09+17.2%

Which assets it traded

Avg allocationDays held% of time heldAsset
0.1573124226.71BTC
0.1532121926.22LINK
0.1677116625.08HYPE
0.1528115824.9ETH
0.1507109623.57SOL
0.155999721.44XRP
0.149397320.92SUI
0.149896620.77DOGE
0.147493020kPEPE
0.165985218.32VVV
0.16562613.46ZEC
0.154660513.01PUMP
0.16094449.55LIT
0.15743487.48XPL
0.1268691.48GRAM

What this is: a historical backtest on real Hyperliquid market data, net of fees, slippage, and funding. Its worst historical drawdown was 33.3%. Expect drawdowns of that order or worse. Past performance does not predict future results, and this is not investment advice. Size your account so a full drawdown is survivable.

Questions

Common questions

Does a MACD crossover strategy work on crypto?

Over 2024-08-15 → 2026-09-29 on real Hyperliquid perps, the default settings earned a Sharpe of 1.87 with +408.8% total return and a 33.3% worst drawdown across 2,746 trades, net of fees, slippage, and funding. Read the drawdown expectations before sizing your account.

Best MACD settings for crypto perps

You can adjust MACD periods, Signal timeframe, Pinned universe. The config explorer on this page lets you compare every setting we tested, including the ones that underperformed, with the exact backtested result for each.

The rule behind it, tested on its own

Related strategies

Which strategy did best on each coin →