The strategy buys when the MACD line crosses above a threshold of -0.0338% of price, and closes the long when the MACD line crosses above its 9-period signal line while that signal is above zero. Each trade has a 0.05% stop loss from entry.
Best run of 8. EUR/USD, 3 min, spread 1, from run pf:2026-10-12-EURUSD-3m.tsv:3.
| Period | Up to 2026-10-12 |
| Instrument | EUR/USD, 3 minutes |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 3 min | 5.57 | 706 | 20.82 | 148,665 USD | -32,474 |
| EUR/USD | 10 min | n/a | 1,841 | 14.94 | 80,538 USD | -27,507 |
| EUR/USD | 5 min | n/a | 1,004 | 20.22 | 70,282 USD | -30,162 |
| EUR/USD | 2 min | n/a | 312 | 25.00 | 51,312 USD | -28,746 |
| EUR/USD | Daily | n/a | 202 | 3.47 | 8,718 USD | -6,659 |
| Nikkei 225 | Daily | n/a | 197 | 2.03 | 4,647 USD | -2,337 |
| Dow Jones | 4 hours | n/a | 179 | 3.35 | 1,928 EUR | -1,408 |
| Dow Jones | Daily | n/a | 246 | 2.03 | 1,516 EUR | -940 |
Charts
The code
// ============================================================== // MACD Threshold Long Signal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 3 minutes // ============================================================== DEFPARAM CumulateOrders = false myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = ExponentialAverage[9](myMacd) linebuy = -close * 0.0338 / 100
14 more lines: the entry and exit rules.
Setup
Questions
Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.
It was tested on 8 market and timeframe combinations. The best run was EUR/USD, 3 minutes, with a profit factor of 5.57 over 706 trades.
The best run had a maximum drawdown of 32,474 USD at the tested position size, against a net result of 148,665 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.