Goes long when the bar's low is above the 9-period EMA and short when its high is below it. Closes the long when price crosses under the EMA and closes the short when price crosses over it.
Best run of 3. USD/JPY, Daily, spread 1, from run pf:2026-10-10-USDJPY-D.tsv:3.
| Period | Up to 2026-10-10 |
| Instrument | USD/JPY, Daily |
| 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.32 | 1,405 | 32.17 | 2,873,250 USD | -481,010 |
| GBP/USD | Daily | n/a | 1,458 | 33.74 | 15,574 USD | -9,815 |
| Gold | 4 hours | n/a | 3,111 | 31.24 | 2,311 EUR | -978 |
Charts
The code
// ============================================================== // Nine EMA Full Candle Entry // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ema = ExponentialAverage[9](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 | 2,873,250.00 USD |
| Net, long run | 2,864,340.00 USD |
| Net on the older data alone | -8,910.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 3 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.32 over 1,405 trades.
The best run had a maximum drawdown of 481,010 USD at the tested position size, against a net result of 2,873,250 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.