Buys when MACD crosses above 0, or when the 20, 50, 100 and 200 period EMAs stack upward. Closes when MACD crosses under its signal line, with a 10% stop loss and 20% profit target.
Best run of 21. EUR/USD, 3 min, spread 1, from run pf:2026-10-12-EURUSD-3m.tsv:7.
| 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 | 2.21 | 5,651 | 37.57 | 1,746,340 USD | -114,701 |
| S&P 500 | Daily | 1.78 | 531 | 58.19 | 5,738 EUR | -851 |
| Nasdaq 100 | Daily | 1.72 | 435 | 54.94 | 21,506 EUR | -3,806 |
| EUR/USD | 5 min | 1.62 | 5,574 | 38.03 | 849,500 USD | -95,938 |
| DAX 40 | Daily | 1.46 | 524 | 54.01 | 18,417 EUR | -3,794 |
| Dow Jones | Daily | 1.44 | 512 | 58.01 | 28,852 EUR | -6,652 |
| Dow Jones | 4 hours | 1.44 | 320 | 56.56 | 21,849 EUR | -4,681 |
| Nasdaq 100 | 4 hours | 1.29 | 1,057 | 56.01 | 16,152 EUR | -3,847 |
| S&P 500 | 4 hours | 1.24 | 1,037 | 55.64 | 3,301 EUR | -765 |
| EUR/USD | 2 min | n/a | 5,561 | 33.03 | 825,552 USD | -108,928 |
| USD/JPY | 4 hours | n/a | 975 | 49.64 | 506,930 USD | -448,760 |
| EUR/USD | 10 min | n/a | 5,345 | 39.76 | 377,259 USD | -114,194 |
| EUR/USD | 15 min | n/a | 5,314 | 39.80 | 294,592 USD | -86,675 |
| EUR/USD | 1 hour | n/a | 4,694 | 45.10 | 153,700 USD | -71,386 |
| EUR/USD | 30 min | n/a | 5,138 | 43.15 | 146,064 USD | -107,027 |
| EUR/USD | Daily | n/a | 347 | 52.45 | 94,168 USD | -29,263 |
| Nikkei 225 | Daily | n/a | 353 | 56.09 | 48,306 USD | -13,662 |
| Nikkei 225 | 4 hours | n/a | 780 | 51.03 | 17,795 USD | -12,557 |
| DAX 40 | 4 hours | n/a | 956 | 53.14 | 10,082 EUR | -6,533 |
| Gold | 4 hours | n/a | 899 | 51.72 | 2,683 EUR | -1,281 |
| Gold | Daily | n/a | 434 | 45.39 | 2,431 EUR | -1,294 |
Charts
Top 10 of 21 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Zero Cross Or EMA Stack Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 3 minutes // ============================================================== DEFPARAM CumulateOrders = false myMacd = MACDLine[12,26,9](close) signal = ExponentialAverage[9](myMacd) emaa = ExponentialAverage[20](close) emab = ExponentialAverage[50](close) emac = ExponentialAverage[100](close) emad = ExponentialAverage[200](close) mindiff = close * 0.0008 / 100
15 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 21 market and timeframe combinations. The best run was EUR/USD, 3 minutes, with a profit factor of 2.21 over 5,651 trades.
The best run had a maximum drawdown of 114,701 USD at the tested position size, against a net result of 1,746,340 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.