// recipe

A MACD strategy

A MACD strategy buys when the MACD line crosses above its signal line and sells when it crosses back. This recipe builds one for Bitcoin without code and tests it. On BTC since 2020 the length of the candles changed the result more than anything else: the same rule lost on 4-hour candles and made money on daily ones, and both trailed simply holding.

3 min read

The rule

MACD is the gap between a 12- and a 26-candle exponential average; its signal line is a 9-candle average of that gap. When the line crosses above its signal line, momentum has turned up.

  • Enter when the MACD line crosses above the signal line, with half of the free capital.
  • Exit when it crosses back below, or at a −6% loss, whichever comes first.

Idea

Follow MACD

Trades BTCUSDT on Binance spot, on daily candles.

Buys when the MACD line (12, 26, 9) crosses above the MACD signal line (12, 26, 9), using 50% of the free capital.

Closes the trade at a loss of −6%. It also closes when the MACD line (12, 26, 9) crosses below the MACD signal line (12, 26, 9).

Every entry and every exit pays 0.1% in fees plus 0.01% slippage.

BTCUSDT 1d, 2020-01-01 → 2026-11-01 · a dry run on past candles

Return
+139.05%
Max drawdown
24.60%
Trades
90
Buy & Hold
+988.12%
Open in the wizard

The wizard opens with these answers. Change any of them, then try it on candles in the editor’s Dry-run panel.

The recipe on daily candles, as the wizard builds it. The button opens the wizard with these answers.

Three steps

  1. Open it. Press Open in the wizard on the card and check the answers: coin, direction and market, candles, which MACD, how much risk.
  2. Try it. Press Fine-tune in the editor, then Test on history. Nothing is saved. Open the line under that button and tick Compare against random entries to see whether the cross beats a coin flip with the same exits.
  3. Keep it. Save the strategy and press Run backtest on its page for the full report.

What it did on Bitcoin

Dry runs on BTC from 2020-01-01 to 2026-11-01. Holding BTC over the same period made about +980%.

8/21/5 on 4-hour candles
Trades876
Returnabout −45%
Max drawdownabout 62%
12/26/9 on 4-hour candles
Trades572
Returnabout −7%
Max drawdownabout 52%
19/39/9 on 4-hour candles
Trades454
Returnabout +43%
Max drawdownabout 38%
12/26/9 on daily candles
Trades90
Returnabout +139%
Max drawdownabout 25%
12/26/9 on 4-hour candles, with the trend filter
Trades330
Returnabout −2%
Max drawdownabout 34%
12/26/9 on 4-hour candles, the short mirror on futures
Trades573
Returnabout −52%
Max drawdownabout 61%

Among the plain long settings, the fewer the trades, the better it went. Every round trip costs about 0.22% of the position, and a fast MACD flips back and forth on noise. The best row is still far behind holding, and it is the best of six on one coin, so run it elsewhere before believing it. The study on ten coins agrees: on daily candles the classic rule made money on 9 of 10 coins, holding did better on 7 of them, and on 4-hour candles costs took most of what it caught.

What to try next

  • A filter. In the wizard, with the bigger trend cut the 4-hour drawdown by a third here. The trend-filter recipe explains it.
  • An ATR stop. In the editor, open Quick add in the exit section and pick Stop by ATR: the stop widens in wild markets and tightens in calm ones.
  • Another trend rule. The golden cross asks the same question of two moving averages.

Frequently asked questions

What are the best MACD settings for crypto?

There is no best setting in general. 12/26/9 is the classic and the place to start. On BTC in 2020–2026 slower settings and longer candles did better than faster ones, mostly because they trade less and pay less in costs.

Does MACD work on Bitcoin?

It made money on daily candles and lost on 4-hour ones, and both trailed holding by a wide margin: about +139% and about −7% against about +980%. Against random entries it did better than the Bollinger bounce: the study has it ahead in 16 of 20 runs.

Do I need to know how to code?

No. The wizard builds the strategy from your answers and the editor changes it with forms; underneath it is a JSON config, not code. Janorium is free, with no card.

Test your own idea

Create a free account, start from a template or from your own rules, and read your first report.

More guides