Buys when the close crosses above the 20-period EMA, with the close above the 200-period EMA and the 9-period EMA above the 21-period EMA. Exits at a 0.718% gain, a 0.539% loss, or a close under the 21-period EMA.
Best run of 9. Gold, 30 min, spread 0.6, from run sweeps:2026-10-07-GOLD-30m-opt.tsv:24.
| Period | Up to 2026-10-07 |
| Instrument | Gold, 30 minutes |
| 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 30 min | n/a | 1,357 | 35.67 | 816 EUR | -358 |
| USD/JPY | 1 hour | n/a | 788 | 28.05 | 140,640 USD | -84,810 |
| EUR/USD | 5 min | n/a | 1,159 | 19.59 | 94,977 USD | -33,176 |
| EUR/USD | 10 min | n/a | 1,120 | 22.77 | 42,548 USD | -27,356 |
| Dow Jones | 4 hours | n/a | 59 | 38.98 | 2,876 EUR | -1,069 |
| EUR/USD | Daily | n/a | 18 | 38.89 | 2,464 USD | -2,276 |
| Nikkei 225 | Daily | n/a | 16 | 50.00 | 1,820 USD | -1,261 |
| DAX 40 | 4 hours | n/a | 79 | 41.77 | 1,263 EUR | -508 |
| US Crude Oil | Daily | n/a | 19 | 73.68 | 646 EUR | -233 |
Charts
The code
// ============================================================== // Keltner Midline Volume Trend Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE vpt = 0 ONCE entryprice = 0 ONCE hithalf = 0 kcmid = ExponentialAverage[20](close) emafast = ExponentialAverage[9](close) emamid = ExponentialAverage[21](close) emalong = ExponentialAverage[200](close)
36 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 9 market and timeframe combinations. The best run by trade count was Gold, 30 minutes, with 1,357 trades.
The best run had a maximum drawdown of 358 EUR at the tested position size, against a net result of 816 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.