// 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%
The wizard opens with these answers. Change any of them, then try it on candles in the editor’s Dry-run panel.
Three steps
- Open it. Press Open in the wizard on the card and check the answers: coin, direction and market, candles, which MACD, how much risk.
- 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.
- 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%.
| Setting | Trades | Return | Max drawdown |
|---|---|---|---|
| 8/21/5 on 4-hour candles | 876 | about −45% | about 62% |
| 12/26/9 on 4-hour candles | 572 | about −7% | about 52% |
| 19/39/9 on 4-hour candles | 454 | about +43% | about 38% |
| 12/26/9 on daily candles | 90 | about +139% | about 25% |
| 12/26/9 on 4-hour candles, with the trend filter | 330 | about −2% | about 34% |
| 12/26/9 on 4-hour candles, the short mirror on futures | 573 | about −52% | about 61% |
- 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
- What is backtesting?How a backtest works, which numbers matter and the traps that make results look too good.
- TradingView backtesting vs JanoriumWhat each tool does well, where it falls short, and which one to pick for crypto strategies.
- Build a strategy with ChatGPT or ClaudeDescribe a trading idea in plain words and let an AI assistant write the strategy config.
- How to backtest a crypto strategyStep by step: rules, costs, the run, the report — with a real BTC backtest as the example.
- Backtest metrics explainedSharpe, drawdown, profit factor, win rate and the rest — what they mean and what counts as good.
- Strategy builder glossaryEvery term of the strategy editor — layers, conditions, bar windows, exits, DCA — explained with an example.
- How Janorium backtestsThe methodology: data, when orders fill, stops, fees, funding, liquidation, metrics — and what is not modeled.
- An RSI strategy in 5 minutesThe classic RSI oversold rule, built in the wizard and backtested step by step.
- Add a trend filter to a strategyOne more condition that keeps a strategy out of the wrong market: a 200-period average, added in four steps.
- Why a backtest has 0 tradesThe usual reasons a strategy never enters, where to see them and how to fix each.
- A Bollinger Bands strategyThe Bollinger bounce built in the wizard, tested on Bitcoin — and why it lost at every setting.
- A volatility squeeze strategyA squeeze breakout built in the wizard and tested on Bitcoin: small drawdowns, modest returns.
- Buy after red daysA red-streak rule built in the wizard and tested on Bitcoin: it barely moves, and one setting decides the sign.
- A breakout on volumeA breakout that asks for volume, built in the wizard and tested on Bitcoin: fewer trades, smaller drawdown, less return.