Buys when the 6-bar SMA of the averaged open is below the 6-bar SMA of the averaged price. Sells when the open average moves above the price average.
Best run of 8. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-04-USDJPY-4h-opt.tsv:46.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, 4 hours |
| Spread | 1 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 4 hours | n/a | 2,165 | 40.42 | 578,460 USD | -321,710 |
| USD/JPY | Daily | n/a | 825 | 38.06 | 770,080 USD | -613,950 |
| Nasdaq 100 | Daily | n/a | 683 | 40.56 | 13,311 EUR | -3,833 |
| DAX 40 | Daily | n/a | 943 | 38.81 | 13,064 EUR | -4,763 |
| Brent Crude | Daily | n/a | 335 | 42.99 | 9,796 EUR | -9,447 |
| Gold | 4 hours | n/a | 1,952 | 36.83 | 2,382 EUR | -904 |
| Gold | Daily | n/a | 856 | 37.15 | 2,270 EUR | -1,218 |
| S&P 500 | Daily | n/a | 905 | 36.69 | 1,587 EUR | -1,527 |
Charts
The code
// ============================================================== // Averaged Price Moving Average Cross // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false hopen = (open[2] + close[2]) / 2 hclose = (open + high + low + close) / 4 emao = Average[6](hopen) emac = Average[6](hclose)
9 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 8 market and timeframe combinations. The best run by trade count was USD/JPY, 4 hours, with 2,165 trades.
The best run had a maximum drawdown of 321,710 USD at the tested position size, against a net result of 578,460 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.