Sells short when the 9-period EMA crosses under the 21-period EMA while both averages are falling over 3 bars. Covers the short when the 9-period EMA crosses back over the 21-period EMA, with no stop or target.
Best run of 2. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:8.
| 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 | 1.75 | 267 | 31.46 | 2,249,740 USD | -460,850 |
| EUR/USD | Daily | n/a | 251 | 33.47 | 60,923 USD | -43,972 |
Charts
The code
// ============================================================== // Three Bar Slope Short Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Short only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fastma = ExponentialAverage[9](close) slowma = ExponentialAverage[21](close) fastslope = (fastma - fastma[3]) / 3 slowslope = (slowma - slowma[3]) / 3
14 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,249,740.00 USD |
| Net, long run | 2,249,740.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 2 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.75 over 267 trades.
The best run had a maximum drawdown of 460,850 USD at the tested position size, against a net result of 2,249,740 USD.
It only takes short trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.