The idea trades pullbacks in an EMA trend. It buys when the 38-period EMA is above the 62-period EMA and price briefly dips below the 38-period EMA while the close is above the 200-period EMA, and sells short on the mirror-image setup.
Best run of 9. USD/JPY, 10 min, spread 1, from run sweeps:2026-10-11-USDJPY-10m-opt.tsv:8.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 10 minutes |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 10 min | n/a | 2,964 | 43.12 | 243,350 USD | -136,560 |
| USD/JPY | 15 min | n/a | 2,911 | 42.15 | 157,370 USD | -151,840 |
| EUR/USD | Daily | n/a | 259 | 28.57 | 67,744 USD | -20,794 |
| Nikkei 225 | Daily | n/a | 237 | 20.25 | 22,999 USD | -7,393 |
| GBP/USD | Daily | n/a | 294 | 28.23 | 10,418 USD | -3,435 |
| US Crude Oil | Daily | n/a | 299 | 11.04 | 6,641 EUR | -3,903 |
| Brent Crude | 1 hour | n/a | 1,182 | 30.20 | 4,238 EUR | -2,866 |
| Gold | 4 hours | n/a | 566 | 29.68 | 933 EUR | -685 |
| Gold | Daily | n/a | 281 | 22.42 | 925 EUR | -418 |
Charts
The code
// ============================================================== // EMA Slingshot With Williams %R // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE calc = 0 ONCE stl = 0 ONCE sts = 0 ONCE willy = -50 emas = ExponentialAverage[62](close) emaf = ExponentialAverage[38](close) up = highest[21](high) lo = lowest[21](low)
42 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 9 market and timeframe combinations. The best run by trade count was USD/JPY, 10 minutes, with 2,964 trades.
The best run had a maximum drawdown of 136,560 USD at the tested position size, against a net result of 243,350 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.