Buys when the EHMA turns upward while a triple-smoothed Gaussian line is rising, with a stop 2 ATR below and target 4 ATR above the entry. Sells when the EHMA turns downward while a long is open.
Best run of 8. Silver, 4 hours, spread 2, from run pf:2026-10-05-SILVER-4h.tsv:6.
| Period | Up to 2026-10-05 |
| Instrument | Silver, 4 hours |
| 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| SilverBest run | 4 hours | 7.57 | 493 | 33.47 | 328,527 USD | -7,409 |
| USD/JPY | Daily | 1.64 | 201 | 42.79 | 15,890 USD | -2,380 |
| Gold | Daily | 1.59 | 203 | 36.45 | 1,277 EUR | -300 |
| Silver | Daily | n/a | 145 | 35.17 | 14,460 USD | -3,796 |
| Brent Crude | Daily | n/a | 93 | 39.78 | 4,957 EUR | -2,901 |
| DAX 40 | 4 hours | n/a | 567 | 32.45 | 4,924 EUR | -2,628 |
| Nasdaq 100 | 4 hours | n/a | 587 | 33.39 | 2,668 EUR | -1,755 |
| Gold | 4 hours | n/a | 530 | 33.40 | 1,327 EUR | -562 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EHMA Turn With ATR Bracket // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false diff = 2 * ExponentialAverage[15](close) - ExponentialAverage[30](close) ehma = ExponentialAverage[5](diff) gfa = ExponentialAverage[20](close) gfb = ExponentialAverage[20](gfa) gf = ExponentialAverage[20](gfb) myAtr = AverageTrueRange[14](close)
17 more lines: the entry and exit rules.
Setup
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 15,890.00 USD |
| Net, long run | 15,890.00 USD |
| Net on the older data alone | 0.00 USD |
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 Silver, 4 hours, with a profit factor of 7.57 over 493 trades.
The best run had a maximum drawdown of 7,408 USD at the tested position size, against a net result of 328,527 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.