Buys when the 5-period EMA crosses above the 9-period EMA with a steep enough slope and a large bullish candle body, and sells short on the mirror condition. The stop is one candle body from entry and the target is two candle bodies away.
Best run of 4. Nikkei 225, 4 hours, spread 10, from run sweeps:2026-10-07-NIKKEI-4h-opt.tsv:32.
| Period | Up to 2026-10-07 |
| Instrument | Nikkei 225, 4 hours |
| Spread | 10 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nikkei 225Best run | 4 hours | n/a | 1,203 | 32.25 | 23,307 USD | -11,528 |
| Silver | Daily | n/a | 410 | 31.46 | 14,626 USD | -9,196 |
| US Crude Oil | 4 hours | n/a | 1,083 | 32.78 | 4,434 EUR | -4,159 |
| S&P 500 | 4 hours | n/a | 870 | 33.22 | 2,069 EUR | -1,387 |
Charts
The code
// ============================================================== // EMA Crossover Angle Candle Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[5](close) emaslow = ExponentialAverage[9](close) spread = emafast - emaslow slope = (spread - spread[3]) / 3
28 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 4 market and timeframe combinations. The best run by trade count was Nikkei 225, 4 hours, with 1,203 trades.
The best run had a maximum drawdown of 11,528 USD at the tested position size, against a net result of 23,307 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.