Buys when the 9-period EMA crosses above the 21-period EMA and sells short when it crosses below. Each trade has a 1% stop loss and a 1% profit target measured from the fill price.
Best run of 3. USD/JPY, 1 hour, spread 1, from run pf:2026-10-12-USDJPY-1h.tsv:7.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, 1 hour |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 1 hour | 1.10 | 6,019 | 30.20 | 1,172,550 USD | -234,510 |
| EUR/USD | Daily | n/a | 551 | 49.55 | 26,741 USD | -17,951 |
| Dow Jones | 4 hours | n/a | 443 | 46.95 | 13,165 EUR | -4,058 |
Charts
The code
// ============================================================== // EMA Crossover 1% Bracket // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[9](close) slow = ExponentialAverage[21](close)
14 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 3 market and timeframe combinations. The best run was USD/JPY, 1 hour, with a profit factor of 1.10 over 6,019 trades.
The best run had a maximum drawdown of 234,510 USD at the tested position size, against a net result of 1,172,550 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.