A trend-following system that enters with the 99-period EMA, ADX above 20 and MACD confirming. It exits at market when open profit falls to 97% of its peak once that peak reaches 0.5%, and uses a 2.5 ATR stop.
Best run of 5. Silver, 1 hour, spread 2, from run sweeps:2026-10-03-SILVER-1h-opt.tsv:7.
| Period | Up to 2026-10-03 |
| Instrument | Silver, 1 hour |
| Spread | 2 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| SilverBest run | 1 hour | n/a | 4,150 | 53.01 | 367,414 USD | -161,272 |
| USD/JPY | Daily | n/a | 482 | 1.87 | 49,890 USD | -27,040 |
| Nasdaq 100 | 1 hour | n/a | 2,079 | 51.52 | 10,302 EUR | -3,996 |
| Brent Crude | 4 hours | n/a | 824 | 62.99 | 7,626 EUR | -2,738 |
| Gold | Daily | n/a | 265 | 64.15 | 1,651 EUR | -620 |
Charts
The code
// ============================================================== // Trend Filtered MACD Trailing Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE lastbull = -1 ONCE lastbear = -1 ONCE lastentry = -1 ONCE peak = 0 ONCE peakset = 0 ONCE armed = 0 fastema = ExponentialAverage[14](close) slowema = ExponentialAverage[39](close) myMacd = fastema - slowema signal = ExponentialAverage[9](myMacd) hist = myMacd - signal trend = ExponentialAverage[99](close) myAdx = ADX[11] volsma = Average[22](volume) myAtr = AverageTrueRange[18](close)
85 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 5 market and timeframe combinations. The best run by trade count was Silver, 1 hour, with 4,150 trades.
The best run had a maximum drawdown of 161,272 USD at the tested position size, against a net result of 367,414 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.