Join waitlist
Strategies / Trend / EMA Crossover Candle Body Bracket

EMA Crossover Candle Body Bracket

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.

TrendLong & shortSwingUS Crude Oil4 hours
1.61Profit factor
20,738Net profit EUR
44.81%Win rate
154Trades
-4,236Max drawdown
135Avg trade

Best run of 16. US Crude Oil, 4 hours, spread 3, from run pf:2026-10-05-CRUDE-4h.tsv:1.

Entry rules, long

  1. The close is above the 9-period EMA
  2. The candle body is at least 30% of the high to low range

Entry rules, short

  1. The close is below the 9-period EMA
  2. The candle body is at least 30% of the high to low range

Exit rules

  1. A 6% stop loss and a 12% profit target, measured from the fill price

Test conditions

PeriodUp to 2026-10-05
InstrumentUS Crude Oil, 4 hours
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run4 hours1.61 15444.8120,738 EUR-4,236
EUR/USD2 minn/a 9553.68432,315 USD-55,373
EUR/USD3 minn/a 6352.38278,445 USD-34,800
EUR/USD15 minn/a 1566.67105,564 USD-17,160
EUR/USD5 minn/a 3246.8882,995 USD-24,168
EUR/USD4 hoursn/a 3243.7570,231 USD-29,946
Dow Jones10 minn/a 1758.8226,773 EUR-9,885
Dow Jones1 hourn/a 2951.7222,549 EUR-9,786
Nasdaq 10030 minn/a 9136.2615,530 EUR-5,843
DAX 4030 minn/a 9834.699,851 EUR-9,283
Brent Crude4 hoursn/a 12339.849,311 EUR-4,243
DAX 403 minn/a 580.006,940 EUR-4,760
US Crude OilDailyn/a 22937.556,353 EUR-4,616
US Crude Oil1 minn/a 2646.154,925 EUR-2,898
Dow Jones1 minn/a 250.004,920 EUR-4,166
Gold1 minn/a 683.332,269 EUR-437

Charts

Results by run

Top 10 of 16 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

EMA
Longer historyRe-run on up to 1,000,000 barsUS Crude Oil · 4 hours · older data 112.80 EUR

US Crude Oil had no history beyond the standard run, so both runs used 22,000 bars.

US Crude Oil · 4 hours

Bars available22,000
Net, standard 200,000-bar run20,738.20 EUR
Net, long run20,851.00 EUR
Net on the older data alone112.80 EUR
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run EMA Crossover Candle Body Bracket in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 4,236 EUR at the tested position size, against a net result of 20,738 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Short Term RSI Pullback Long Short

Best run on the same market, US Crude Oil.

1.33 PF · 493 trades

Moving Average Colour Shift

Also a trend strategy.

1.62 PF · 533 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs