momentummedium-high risk⚠ Data as of 2026-07-05 — refresh pending

MACD Crossover Strategy (Crypto)

Does a MACD crossover strategy work on crypto? Backtested on real Hyperliquid perps from 2024-08-15 to 2026-07-05, the default settings earned a Sharpe of 1.77 — +260.2% total return with a 33.4% worst drawdown across 5,265 trades, net of fees, slippage, and funding.

By Keel Research · Data as of 2026-07-05 · how this backtest was produced
EquityDrawdown
Sharpe
1.77
default settings
Total return
+260.2%
Worst drawdown
−33.4%
Trades
5,265

2024-08-152026-07-05 · net of fees, slippage, and funding · price-only Sharpe 1.90 · 5,265 trades — the numbers already include that turnover cost.

At $1,000, this strategy’s worst historical dip was about $334. 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-07-05 the default four-hour settings returned +274.9% with a Sharpe of 1.83 and a maximum drawdown of −31.7%, 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 −31.7% maximum. At 5,205 trades over the window, turnover is meaningful, so fees matter.

How it’s built

The exact strategy behind this backtest — no black box. Switch to code to see or copy the full definition.

Configuration

Globalsconfig
target_timeframe4h
UniverseassetsTop by Volume · HL Perps · 15 assets15 resolved
Executiontrading
rebalanceEvery Bar

Factories

trend_vs_200factory
Pipeline5 steps
PriceDataLoaderData Loader
timeframe15min
TargetTimeframeResamplerData Transform
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
PositionStateMachinePosition Manager
entry_slotmacd_entryexit_slotmacd_exit
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.77
Return
260.2%
Worst DD
−33.4%
Trades
5,265

Heads up: high_turnover.

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

Compare all 16 settings
SettingsSharpeReturnWorst DDTrades
MACD 8/17/9 · Signal 4h · Pinned top8_launch0.9654.6%−24.8%2,910
MACD 8/17/9 · Signal 4h · Pinned top15_launch1.78250.7%−32.9%5,197
MACD 8/17/9 · Signal 1d · Pinned top8_launch-0.25-11.8%−28.4%255
MACD 8/17/9 · Signal 1d · Pinned top15_launch-0.17-16.9%−36.7%459
MACD 12/26/9 · Signal 4h · Pinned top8_launch1.0867.5%−27.9%2,927
MACD 12/26/9 · Signal 4h · Pinned top15_launchdefault1.77260.2%−33.4%5,265
MACD 12/26/9 · Signal 1d · Pinned top8_launch-1.25-34.5%−35.6%229
MACD 12/26/9 · Signal 1d · Pinned top15_launch-0.58-33.9%−46.4%422
MACD 19/39/9 · Signal 4h · Pinned top8_launch0.9659.9%−28.7%3,102
MACD 19/39/9 · Signal 4h · Pinned top15_launch1.41172.1%−30.0%5,493
MACD 19/39/9 · Signal 1d · Pinned top8_launch-0.19-7.9%−33.0%235
MACD 19/39/9 · Signal 1d · Pinned top15_launch0.160.6%−46.1%434
MACD 24/52/18 · Signal 4h · Pinned top8_launch0.6736.6%−28.1%3,197
MACD 24/52/18 · Signal 4h · Pinned top15_launch1.04105.5%−39.0%5,812
MACD 24/52/18 · Signal 1d · Pinned top8_launch-0.45-15.3%−27.4%242
MACD 24/52/18 · Signal 1d · Pinned top15_launch0.07-4.4%−38.8%453

The data

Monthly returns

MonthReturn
2024-080.0%
2024-09+10.6%
2024-10+5.5%
2024-11+70.4%
2024-12-5.7%
2025-01-3.4%
2025-02-6.0%
2025-03-9.6%
2025-04+9.9%
2025-05+5.3%
2025-06+1.4%
2025-07+7.6%
2025-08-0.4%
2025-09+28.7%
2025-10-3.1%
2025-11-2.7%
2025-12+3.3%
2026-01+29.9%
2026-02+9.9%
2026-03-0.0%
2026-04-8.5%
2026-05+29.6%
2026-06-15.7%
2026-07+4.2%

Which assets it traded

Avg allocationDays held% of time heldAsset
0.1755102224.72HYPE
0.1662100624.33BTC
0.159895523.1LINK
0.160491422.11ETH
0.165186821XRP
0.159280519.47DOGE
0.159680019.35SOL
0.157174918.12SUI
0.173669116.72VVV
0.154566816.16kPEPE
0.176641910.14ZEC
0.16233809.19PUMP
0.17122385.76XPL
0.17041874.52LIT
000GRAM

What this is: a historical backtest on real Hyperliquid market data, net of fees, slippage, and funding. Its worst historical drawdown was 33.4% — 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-07-05 on real Hyperliquid perps, the default settings earned a Sharpe of 1.77 with +260.2% total return and a 33.4% worst drawdown across 5,265 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.

Related strategies