It buys when SMA(10) crosses above SMA(30) with the close above the 5-period EMA, and sells short on the mirror condition. Each trade uses a 1 percent stop loss and a 2 percent profit target.
Best run of 11. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:38.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.48 | 387 | 39.02 | 1,358,410 USD | -225,390 |
| USD/JPY | 30 min | n/a | 4,946 | 35.73 | 802,160 USD | -202,100 |
| USD/JPY | 1 hour | n/a | 3,587 | 35.96 | 642,690 USD | -269,850 |
| USD/JPY | 15 min | n/a | 5,027 | 34.06 | 429,510 USD | -290,420 |
| EUR/USD | Daily | n/a | 379 | 37.20 | 53,385 USD | -17,150 |
| EUR/USD | 4 hours | n/a | 1,260 | 36.98 | 47,784 USD | -29,045 |
| GBP/USD | Daily | n/a | 418 | 37.80 | 10,975 USD | -2,763 |
| DAX 40 | 1 hour | n/a | 3,128 | 35.13 | 10,808 EUR | -4,643 |
| Dow Jones | Daily | n/a | 450 | 30.44 | 5,936 EUR | -3,248 |
| Gold | 4 hours | n/a | 904 | 33.96 | 844 EUR | -648 |
| Gold | Daily | n/a | 412 | 35.68 | 504 EUR | -180 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // SMA Crossover With EMA Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fastma = Average[10](close) slowma = Average[30](close) emafive = ExponentialAverage[5](close)
17 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 11 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.48 over 387 trades.
The best run had a maximum drawdown of 225,390 USD at the tested position size, against a net result of 1,358,410 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.