Does the MACD strategy work on Bitcoin?
The MACD rule made money in 1 of 8 runs on Bitcoin (BTC) from August 2024 through November 2026, after fees and funding; holding BTC returned -35.6%. It held up best on the daily chart, long and short, with a 200-day trend filter, where it returned +15.7%.
Data through December 1, 2026 on Hyperliquid perpetuals, net of fees, slippage and funding
Full test: MACD
Which settings mattered most?
The test ran MACD at every combination of Fast EMA and Slow EMA on BTC. Each square is one combination: choose one to see its numbers.
Each square shows a Sharpe ratio. Colour follows the number: red below zero, green above it. The outlined square is the default setting.
| Fast EMAacross: Slow EMA | 21 | 26 | 35 | 50 |
|---|---|---|---|---|
| 8 | ||||
| 12 | ||||
| 16 | ||||
| 20 |
Fast EMA 12, Slow EMA 26 (the default setting)
- Sharpe
- -0.54
- Return
- -42.6%
- Worst drawdown
- 52.7%
- Win rate
- 31.9%
- Round trips
- 380
- Fees
- 20.4%
- Funding paid
- -0.9%
What are the numbers behind the answer?
The table lists every run of MACD that the answer reads, from 2024-08-15 to 2026-12-01.
The MACD rule made money in 1 of 8 runs on BTC and beat holding BTC in 6. It held up best on the daily chart, long and short, with a 200-day trend filter. The MACD rule on BTC alone, long and short, returned -42.6% on the 4-hour chart (Sharpe -0.54, 380 round trips) and -12.2% on the daily chart (Sharpe 0.00, 67 round trips) on Hyperliquid perpetuals from August 2024 through November 2026, net of fees, slippage and funding. Holding BTC over the same window returned -35.6%, between the runs, and the same rule across 10 coins at once returned -7.9% (Sharpe 0.09).
MACD on BTC
| Run | Sharpe | Return | Worst drawdown | Win rate | Round trips | Fees | Funding paid |
|---|---|---|---|---|---|---|---|
| BTC 4h long and short | -0.54 | -42.6% | 52.7% | 31.9% | 380 | 20.4% | -0.9% |
| BTC 1d long and short | 0.00 | -12.2% | 46.0% | 30.3% | 67 | 3.4% | 0.8% |
| Holding BTC | -0.10 | -35.6% | 66.5% | n/a | n/a | n/a | n/a |
| The same rule on the basket (4h) | 0.09 | -7.9% | 47.0% | 33.5% | 3,240 | 27.9% | 3.0% |
The highlighted rows are the runs the answer reads. No run is left out for losing money.
Where did it hold up best?
Among the runs that can be opened from this page, MACD, BTC, daily chart, long and short, with 200-day trend filter had the highest Sharpe of those that made money.
MACD, BTC, daily chart, long and short, with 200-day trend filter. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $253. Free account, your own Hyperliquid keys. Keel only trades.
Configuration
Globals(target_timeframe="1d")
Universe(mode="manual", symbols=["BTC"], market="perp", resolved=["BTC"], resolved_at="2026-07-06T00:00:00Z")
Execution(rebalance="buffered", buffer_threshold=0.25, buffer_mode="relative", rebalance_method="to_edge")
Pipeline([
PriceDataLoader(),
Store("ohlcv"),
MACD(fast_period=12, slow_period=26, signal_period=9),
Store("hist"),
{
"long_in": [Load("hist"), AboveThresholdFilter(threshold=0.0), Store("long_in")],
"short_in": [Load("hist"), BelowThresholdFilter(threshold=0.0), Store("short_in")],
"long_out": [Load("hist"), BelowThresholdFilter(threshold=0.0), Store("long_out")],
"short_out": [Load("hist"), AboveThresholdFilter(threshold=0.0), Store("short_out")],
},
{"fast": [Load("long_in")], "slow": [Load("short_in")]},
Crossover(),
ThresholdCross(upper=0.5, lower=-0.5, mode="symmetric"),
Store("fix_entries"),
Load("ohlcv"),
{"fast": [ExtractSeries(series_name="close")], "slow": [SMA(period=200)]},
Crossover(),
Store("fix_trend"),
{
"fix_long": [{"a": [Load("fix_entries"), AboveThresholdFilter(threshold=0.5)], "b": [Load("fix_trend"), AboveThresholdFilter(threshold=0.0)]}, MaskAnd(), Store("fix_long")],
"fix_short": [{"a": [Load("fix_entries"), BelowThresholdFilter(threshold=-0.5)], "b": [Load("fix_trend"), BelowThresholdFilter(threshold=0.0)]}, MaskAnd(), Store("fix_short")],
},
{"fast": [Load("fix_long")], "slow": [Load("fix_short")]},
Crossover(),
ThresholdCross(lower=-0.5, upper=0.5, mode="symmetric"),
Store("entries"),
TradeManager(entries="entries", prices="ohlcv"),
{
"long_exit": [{"a": [IsLong()], "b": [Load("long_out")]}, MaskAnd(), Exit()],
"short_exit": [{"a": [IsShort()], "b": [Load("short_out")]}, MaskAnd(), Exit()],
},
Exposure(),
EqualWeightSizer(target_leverage=1.0),
], name="macd")
Ask your assistant to run this
The result on this page was computed with Keel. With the Keel connector, an assistant such as Claude or ChatGPT can run a variation of this test (another coin, timeframe or setting) on the same Hyperliquid perpetuals data.
Change the coin, the timeframe or a setting in the prompt before sending it.
For assistants: The tables on this page are served as JSON at https://usekeel.io/strategies/questions/does-macd-work-on-bitcoin/data.json. The Keel connector at https://mcp.usekeel.io/mcp runs backtests on the same data: keel_strategy_compose saves a strategy from its source, which the Code view on this page shows, and keel_backtest_run runs it. The steps to add the connector are at https://usekeel.io/agents.
What do fees and funding take?
The runs of MACD paid the fees and funding below, as shares of the starting account over the whole window.
The cost model: 4.5bp fee + 4.5bp slippage per trade (9bp round-trip); funding included.
| Run | Fees | Funding paid |
|---|---|---|
| BTC 4h long and short | 20.4% | -0.9% |
| BTC 1d long and short | 3.4% | 0.8% |
| The same rule on the basket (4h) | 27.9% | 3.0% |
What else did the test measure?
These tables hold the other runs of MACD from the same test, over the same window and costs.
More runs on BTC
| Run | Sharpe | Return | Worst drawdown | Win rate | Round trips | Fees | Funding paid |
|---|---|---|---|---|---|---|---|
| BTC 4h long only | -0.38 | -23.0% | 41.4% | 31.6% | 190 | 13.0% | 9.0% |
| BTC 1d long only | -0.03 | -6.6% | 31.2% | 33.3% | 34 | 2.2% | 9.3% |
| BTC 4h with Vol-targeted sizing | -0.46 | -37.3% | 48.4% | 31.9% | 380 | 21.2% | -0.7% |
| BTC 1d with Vol-targeted sizing | 0.00 | -12.2% | 46.0% | 30.3% | 67 | 3.4% | 0.8% |
| BTC 4h with 200-day trend filter | -0.33 | -19.0% | 28.9% | 30.8% | 157 | 8.7% | 1.0% |
| BTC 1d with 200-day trend filter | 0.40 | +15.7% | 25.3% | 26.7% | 30 | 2.0% | 1.8% |
Settings on BTC
| Run | Sharpe | Return | Worst drawdown | Win rate | Round trips | Fees | Funding paid |
|---|---|---|---|---|---|---|---|
| fast 8, slow 21 | -0.93 | -57.8% | 61.5% | 33.7% | 461 | 22.3% | -0.9% |
| fast 8, slow 26 | -0.52 | -41.7% | 49.4% | 34.2% | 434 | 23.8% | -0.9% |
| fast 8, slow 35 | -0.30 | -30.9% | 44.9% | 32.1% | 424 | 25.3% | -0.9% |
| fast 8, slow 50 | -0.77 | -51.7% | 66.1% | 29.9% | 422 | 21.9% | -1.0% |
| fast 12, slow 21 | -0.51 | -41.4% | 51.0% | 32.8% | 409 | 23.3% | -0.9% |
| fast 12, slow 26 | -0.54 | -42.6% | 52.7% | 31.9% | 380 | 20.4% | -0.9% |
| fast 12, slow 35 | -0.64 | -46.9% | 63.0% | 29.7% | 378 | 20.8% | -0.8% |
| fast 12, slow 50 | -0.41 | -36.3% | 53.4% | 29.5% | 350 | 22.6% | -0.7% |
| fast 16, slow 21 | -0.52 | -41.5% | 50.9% | 32.4% | 375 | 20.1% | -0.9% |
| fast 16, slow 26 | -0.58 | -44.2% | 60.8% | 30.5% | 365 | 21.9% | -0.8% |
| fast 16, slow 35 | -0.39 | -35.3% | 54.8% | 31.2% | 334 | 22.3% | -0.4% |
| fast 16, slow 50 | -0.43 | -37.0% | 53.3% | 32.3% | 308 | 19.4% | -0.3% |
| fast 20, slow 21 | -0.58 | -44.3% | 60.3% | 30.5% | 355 | 21.1% | -0.8% |
| fast 20, slow 26 | -0.34 | -32.9% | 51.9% | 31.4% | 332 | 22.2% | -0.6% |
| fast 20, slow 35 | -0.46 | -39.0% | 55.9% | 31.9% | 318 | 19.8% | -0.1% |
| fast 20, slow 50 | -0.66 | -47.3% | 63.6% | 28.2% | 295 | 18.1% | 0.0% |
How does it compare with holding?
The chart draws MACD, BTC, 4-hour chart, long and short against holding the same coins over the same weeks.
How was this tested?
The test of MACD ran on Hyperliquid perpetual futures from 2024-08-15 to 2026-12-01, net of fees, slippage and funding.
MACD
- Entry
- MACD(12, 26, 9) on closes. Go long when the MACD line closes above its signal line (the histogram turns positive). Go short when it closes below it.
- Exit
- Stop and reverse: the opposite cross closes the trade and opens the other side on the same bar.
- Market
- Hyperliquid perpetual futures
- Window
- 2024-08-15 to 2026-12-01
- Costs
- 4.5bp fee + 4.5bp slippage per trade (9bp round-trip); funding included
- The buttons open
- MACD, BTC, daily chart, long and short, with 200-day trend filter
- Its coin
- BTC, traded on its own
- How the coins were picked
- The 10 coins of the basket are the Hyperliquid perps with the most traded volume in the 90 days to December 1, 2026. They were picked on the last day of the test, with hindsight, so the list favours coins that were heavily traded at the end.
Every number on this page comes from Keel backtests on Hyperliquid perpetual futures, net of fees, slippage and funding. These are historical results for one window. They do not predict the next one, and none of this is investment advice. How these backtests were produced has the method, and the guide to crypto backtesting covers fees, funding, slippage, look-ahead and overfitting.
What changes for my coins and settings?
The test of MACD used one window, one set of coins and one set of settings, and each of those is something you can change in your own draft.
- This is one window, from August 2024 through November 2026. Another period can give another answer.
- This is one definition of the rule, at its textbook settings.
- Other coins
- Fork the strategy and change its coins, then backtest it again.
- Another timeframe
- Change the timeframe in the editor and run the same test on it.
- Other settings
- Change the settings in the editor and backtest your version with fees, slippage and funding.
- From today
- Paper trade your version on live Hyperliquid prices with simulated money, with fees and funding charged.
MACD, BTC, daily chart, long and short, with 200-day trend filter. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $253. Free account, your own Hyperliquid keys. Keel only trades.
Paper trade it from today: Opens it on the paper step: simulated money on live Hyperliquid prices, no real money. The free plan runs 1 paper strategy at a time.
How do I run it myself?
Running MACD, BTC, daily chart, long and short, with 200-day trend filter yourself takes three steps in Keel, and you can stop after any of them.
Fork it
Open this strategy in Keel as your own draft. Change the coins, the timeframe or the settings, and backtest your version with fees, slippage and funding before you trust it.
Paper trade it
Run it forward on live Hyperliquid prices with simulated money, with fees and funding charged. You need no wallet for this, and no money is at risk, so you can see whether your version trades the way its backtest did.
How paper trading worksRun it from your own Hyperliquid account
Connect the wallet you use on Hyperliquid and approve an agent wallet: a separate key that can place trades for you but can never withdraw or transfer funds. Your money stays in your own account. Keel runs the strategy on its servers and it decides after each candle closes, so nothing has to stay open on your computer. One strategy runs per account and trades all of it, and Keel shows the amount it needs before you go live. Pause it or revoke the agent wallet whenever you like; that never moves your money.
How a Keel trading bot works
MACD, BTC, daily chart, long and short, with 200-day trend filter. A starting point from this test, not a recommendation.
At $1,000, this strategy’s worst historical dip was about $253. Free account, your own Hyperliquid keys. Keel only trades.
Building, backtesting and paper trading are free to start, and the free plan can also run a strategy live. The pricing page has the fees and limits.
What else do readers ask?
Are fees and funding included?
Yes. Every result is net of fees, slippage and funding: 4.5bp fee + 4.5bp slippage per trade (9bp round-trip); funding included.
Is the MACD crossover profitable on Bitcoin?
The MACD rule made money in 1 of 8 runs on Bitcoin (BTC) from August 2024 through November 2026, after fees and funding; holding BTC returned -35.6%.