Join waitlist
Strategies / Momentum / EMA Crossover Angle Candle Filter

EMA Crossover Angle Candle Filter

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.

MomentumLong & shortSwingNikkei 2254 hours
n/aProfit factor
23,307Net profit USD
32.25%Win rate
1,203Trades
-11,528Max drawdown
19.37Avg trade

Best run of 4. Nikkei 225, 4 hours, spread 10, from run sweeps:2026-10-07-NIKKEI-4h-opt.tsv:32.

Entry rules, long

  1. The absolute slope of the EMA gap over 3 bars is at least 0.5773502692.
  2. The candle is bullish (close above open) and its body is at least the median of the last 200 bodies.
  3. The candle's risk (close minus open) is greater than the tick size.
  4. Signals are only considered after bar 210, and only when flat.

Entry rules, short

  1. The absolute slope of the EMA gap over 3 bars is at least 0.5773502692.
  2. The candle is bearish (close below open) and its body is at least the median of the last 200 bodies.
  3. The candle's risk (open minus close) is greater than the tick size.
  4. Signals are only considered after bar 210, and only when flat.

Exit rules

  1. The profit target is 2 times that body distance from the entry.
  2. No other exit is used, so trades close only at the stop or target.

Test conditions

PeriodUp to 2026-10-07
InstrumentNikkei 225, 4 hours
Spread10 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-07

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best run4 hoursn/a 1,20332.2523,307 USD-11,528
SilverDailyn/a 41031.4614,626 USD-9,196
US Crude Oil4 hoursn/a 1,08332.784,434 EUR-4,159
S&P 5004 hoursn/a 87033.222,069 EUR-1,387

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run EMA Crossover Angle Candle Filter 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 4 market and timeframe combinations. The best run by trade count was Nikkei 225, 4 hours, with 1,203 trades.

How large was the drawdown?

The best run had a maximum drawdown of 11,528 USD at the tested position size, against a net result of 23,307 USD.

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

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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