Buys when the close is above the 125, 680 and 2500 period EMAs while a linear regression oscillator is below zero and rising. Closes the long when the close is above 1.012 times the entry price and the oscillator is falling.
Best run of 45. Gold, 4 hours, spread 0.6, from run pf:2026-10-05-GOLD-4h.tsv:3.
| Period | Up to 2026-10-05 |
| Instrument | Gold, 4 hours |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | 4 hours | 1.52 | 275 | 52.73 | 2,235 EUR | -405 |
| USD/JPY | 10 min | 1.46 | 126 | 67.46 | 485,160 USD | -111,890 |
| Silver | 15 min | 1.28 | 677 | 53.91 | 26,625 USD | -4,865 |
| Brent Crude | 2 min | 1.27 | 299 | 58.86 | 5,195 EUR | -1,169 |
| Brent Crude | 3 min | 1.23 | 357 | 58.26 | 5,226 EUR | -1,195 |
| USD/JPY | 30 min | n/a | 263 | 60.08 | 374,710 USD | -198,010 |
| USD/JPY | 15 min | n/a | 142 | 62.68 | 282,650 USD | -150,650 |
| USD/JPY | 4 hours | n/a | 147 | 57.14 | 280,810 USD | -191,580 |
| USD/JPY | Daily | n/a | 72 | 47.22 | 267,610 USD | -242,630 |
| USD/JPY | 2 min | n/a | 26 | 69.23 | 133,150 USD | -67,400 |
| EUR/USD | 2 min | n/a | 27 | 37.04 | 78,457 USD | -32,580 |
| EUR/USD | 4 hours | n/a | 161 | 57.76 | 34,455 USD | -29,468 |
| Silver | 4 hours | n/a | 274 | 42.34 | 18,515 USD | -8,353 |
| Nikkei 225 | 30 min | n/a | 661 | 56.58 | 17,558 USD | -6,926 |
| Nikkei 225 | 10 min | n/a | 377 | 58.62 | 17,060 USD | -9,242 |
| Nikkei 225 | 3 min | n/a | 216 | 61.11 | 15,874 USD | -12,355 |
| Nikkei 225 | 5 min | n/a | 259 | 60.62 | 15,603 USD | -11,449 |
| Dow Jones | Daily | n/a | 283 | 45.23 | 14,948 EUR | -5,235 |
| Dow Jones | 15 min | n/a | 257 | 61.09 | 13,624 EUR | -4,709 |
| Silver | 10 min | n/a | 584 | 52.57 | 13,280 USD | -7,370 |
| Dow Jones | 30 min | n/a | 205 | 60.98 | 12,541 EUR | -4,674 |
| Silver | 1 hour | n/a | 737 | 46.40 | 11,698 USD | -9,696 |
| Dow Jones | 4 hours | n/a | 86 | 60.47 | 10,641 EUR | -3,706 |
| Nasdaq 100 | 15 min | n/a | 468 | 60.26 | 8,389 EUR | -3,930 |
| Dow Jones | 5 min | n/a | 115 | 63.48 | 7,962 EUR | -4,708 |
| Silver | 5 min | n/a | 452 | 55.53 | 7,168 USD | -6,688 |
| Nasdaq 100 | 1 hour | n/a | 652 | 57.21 | 6,736 EUR | -4,755 |
| Nasdaq 100 | 30 min | n/a | 688 | 58.14 | 6,457 EUR | -4,291 |
| Brent Crude | 1 hour | n/a | 440 | 50.45 | 5,417 EUR | -2,200 |
| Nasdaq 100 | 10 min | n/a | 330 | 58.48 | 5,081 EUR | -3,407 |
| Brent Crude | 1 min | n/a | 275 | 60.36 | 4,732 EUR | -2,219 |
| Nasdaq 100 | Daily | n/a | 228 | 37.28 | 4,153 EUR | -3,421 |
| Brent Crude | 5 min | n/a | 423 | 56.03 | 3,749 EUR | -2,407 |
| US Crude Oil | 2 min | n/a | 342 | 57.31 | 3,725 EUR | -1,401 |
| Gold | 10 min | n/a | 288 | 63.89 | 2,358 EUR | -795 |
| US Crude Oil | 3 min | n/a | 386 | 55.18 | 2,261 EUR | -2,034 |
| Gold | 1 hour | n/a | 554 | 55.78 | 1,999 EUR | -527 |
| Gold | 15 min | n/a | 372 | 61.56 | 1,816 EUR | -957 |
| Gold | 5 min | n/a | 237 | 64.98 | 1,648 EUR | -1,243 |
| S&P 500 | 15 min | n/a | 345 | 61.45 | 1,629 EUR | -896 |
| Gold | 30 min | n/a | 536 | 57.09 | 1,611 EUR | -606 |
| Gold | Daily | n/a | 179 | 43.58 | 1,427 EUR | -416 |
| FTSE 100 | 3 min | n/a | 72 | 63.89 | 1,090 EUR | -761 |
| S&P 500 | 30 min | n/a | 520 | 59.42 | 1,018 EUR | -959 |
| S&P 500 | 1 min | n/a | 32 | 71.88 | 803 EUR | -508 |
Charts
Top 10 of 45 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EMA Filtered Oscillator Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false emaa = ExponentialAverage[125](close) emab = ExponentialAverage[680](close) emac = ExponentialAverage[2500](close) myE = (Highest[20](high) + Lowest[20](low)) / 2 + Average[20](close) src = close - myE / 2 osc = LinearRegression[20](src)
14 more lines: the entry and exit rules.
Setup
Gold had no history beyond the standard run, so both runs used 30,000 bars.
| Bars available | 30,000 |
| Net, standard 200,000-bar run | 2,234.80 EUR |
| Net, long run | 2,234.80 EUR |
| Net on the older data alone | 0.00 EUR |
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 45 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.52 over 275 trades.
The best run had a maximum drawdown of 405 EUR at the tested position size, against a net result of 2,235 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.