Buys when the 13-period EMA and the MACD histogram both rise, and sells short when both fall. Any other bar closes the open position, and each opposite signal reverses it.
Best run of 1. GBP/USD, Daily, spread 1.5, from run sweeps:2026-10-11-GBPUSD-D-opt.tsv:21.
| Period | Up to 2026-10-11 |
| Instrument | GBP/USD, Daily |
| Spread | 1.5 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GBP/USDBest run | Daily | n/a | 2,808 | 35.04 | 13,135 USD | -6,056 |
Charts
The code
// ============================================================== // EMA MACD Impulse System // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ema = ExponentialAverage[13](close) myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = Average[9](myMacd) hist = myMacd - signal
22 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 one combination, GBP/USD, Daily, with 2,808 trades.
The best run had a maximum drawdown of 6,056 USD at the tested position size, against a net result of 13,135 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.