Join waitlist
Strategies / Breakout / EMA Filtered Range Breakout

EMA Filtered Range Breakout

The strategy buys when price breaks above the highest high of the last 20 bars while the 9-period EMA is above the 20-period EMA. It sells short on the mirror breakdown below the lowest low, with a 6% stop and 12% target.

BreakoutLong & shortSwingGold1 hour
n/aProfit factor
1,804Net profit EUR
36.74%Win rate
2,322Trades
-1,104Max drawdown
0.78Avg trade

Best run of 7. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-07-GOLD-1h-opt.tsv:2.

Entry rules, long

  1. The 9-period EMA is above the 20-period EMA

Entry rules, short

  1. The 9-period EMA is below the 20-period EMA

Exit rules

  1. An opposite signal opens a trade in the other direction

Test conditions

PeriodUp to 2026-10-07
InstrumentGold, 1 hour
Spread0.6 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
GoldBest run1 hourn/a 2,32236.741,804 EUR-1,104
USD/JPYDailyn/a 30738.441,879,020 USD-1,104,290
Silver4 hoursn/a 68837.6527,189 USD-12,321
US Crude OilDailyn/a 43935.769,748 EUR-6,074
Brent CrudeDailyn/a 20537.569,609 EUR-8,443
GoldDailyn/a 38034.742,894 EUR-892
Gold4 hoursn/a 61839.972,877 EUR-808

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Filtered Range Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

emafast = ExponentialAverage[9](close)
emaslow = ExponentialAverage[20](close)
res = highest[20](high)[1]
sup = lowest[20](low)[1]

16 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.
  • The maximum drawdown of 1,104 EUR is large next to the net profit of 1,804 EUR.

Questions

About this strategy

Can I run EMA Filtered Range Breakout 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 7 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 2,322 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,104 EUR at the tested position size, against a net result of 1,804 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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 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