This idea buys when a 5-period EMA crosses above a 13-period EMA and sells short on the opposite cross. Each trade has a stop 1% from the signal bar close, and each opposite cross reverses the position.
Best run of 3. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:7.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 12.33 | 1,009 | 1.88 | 1,518,750 USD | -119,470 |
| Brent Crude | Daily | n/a | 386 | 14.25 | 21,466 EUR | -9,663 |
| Gold | 4 hours | n/a | 2,351 | 28.33 | 1,927 EUR | -1,493 |
Charts
The code
// ============================================================== // Fast EMA Crossover With Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE ready = 0 fast = ExponentialAverage[5](close) slow = ExponentialAverage[13](close) stopdist = close * 0.01
15 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 | 1,518,750.00 USD |
| Net, long run | 1,518,750.00 USD |
| Net on the older data alone | 0.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 12.33 over 1,009 trades.
The best run had a maximum drawdown of 119,470 USD at the tested position size, against a net result of 1,518,750 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.