Buys when the 9-period EMA crosses above the 20-period EMA with the close above the 9-period EMA and a candle body at least 30% of its range, and sells short on the mirror condition. Each trade has a 6% stop loss and a 12% profit target, and new trades open only when flat.
Best run of 16. US Crude Oil, 4 hours, spread 3, from run pf:2026-10-05-CRUDE-4h.tsv:1.
| Period | Up to 2026-10-05 |
| Instrument | US Crude Oil, 4 hours |
| Spread | 3 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | 4 hours | 1.61 | 154 | 44.81 | 20,738 EUR | -4,236 |
| EUR/USD | 2 min | n/a | 95 | 53.68 | 432,315 USD | -55,373 |
| EUR/USD | 3 min | n/a | 63 | 52.38 | 278,445 USD | -34,800 |
| EUR/USD | 15 min | n/a | 15 | 66.67 | 105,564 USD | -17,160 |
| EUR/USD | 5 min | n/a | 32 | 46.88 | 82,995 USD | -24,168 |
| EUR/USD | 4 hours | n/a | 32 | 43.75 | 70,231 USD | -29,946 |
| Dow Jones | 10 min | n/a | 17 | 58.82 | 26,773 EUR | -9,885 |
| Dow Jones | 1 hour | n/a | 29 | 51.72 | 22,549 EUR | -9,786 |
| Nasdaq 100 | 30 min | n/a | 91 | 36.26 | 15,530 EUR | -5,843 |
| DAX 40 | 30 min | n/a | 98 | 34.69 | 9,851 EUR | -9,283 |
| Brent Crude | 4 hours | n/a | 123 | 39.84 | 9,311 EUR | -4,243 |
| DAX 40 | 3 min | n/a | 5 | 80.00 | 6,940 EUR | -4,760 |
| US Crude Oil | Daily | n/a | 229 | 37.55 | 6,353 EUR | -4,616 |
| US Crude Oil | 1 min | n/a | 26 | 46.15 | 4,925 EUR | -2,898 |
| Dow Jones | 1 min | n/a | 2 | 50.00 | 4,920 EUR | -4,166 |
| Gold | 1 min | n/a | 6 | 83.33 | 2,269 EUR | -437 |
Charts
Top 10 of 16 runs. The full list is in the table above.
The code
// ============================================================== // EMA Crossover Candle Body Bracket // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false emaf = ExponentialAverage[9](close) emas = ExponentialAverage[20](close) rng = high - low body = ABS(close - open) strong = 0
20 more lines: the entry and exit rules.
Setup
US Crude Oil had no history beyond the standard run, so both runs used 22,000 bars.
| Bars available | 22,000 |
| Net, standard 200,000-bar run | 20,738.20 EUR |
| Net, long run | 20,851.00 EUR |
| Net on the older data alone | 112.80 EUR |
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 16 market and timeframe combinations. The best run was US Crude Oil, 4 hours, with a profit factor of 1.61 over 154 trades.
The best run had a maximum drawdown of 4,236 EUR at the tested position size, against a net result of 20,738 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.