Join waitlist
Strategies / Mean reversion / EMA Deviation Reversion

EMA Deviation Reversion

The idea buys when price closes at least 2% below a 55 period EMA, and sells short when it closes at least 2% above, provided the candle body is under 2%. Positions close when price returns to the EMA.

Mean reversionLong & shortIntradayEUR/USD3 min
5.65Profit factor
692,090Net profit USD
33.86%Win rate
127Trades
-49,159Max drawdown
5,450Avg trade

Best run of 41. EUR/USD, 3 min, spread 1, from run pf:2026-10-04-EURUSD-3m.tsv:1.

Entry rules, long

  1. The candle body (absolute close minus open, as a percent of open) is under 2%.
  2. No long position is open.

Entry rules, short

  1. The candle body (absolute close minus open, as a percent of open) is under 2%.
  2. No short position is open.

Exit rules

  1. The close at or below the 55 period EMA closes an open short.
  2. A 2% stop loss from the entry price applies to both long and short trades.
  3. An opposite entry signal reverses the position.

Test conditions

PeriodUp to 2026-10-04
InstrumentEUR/USD, 3 minutes
Spread1 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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run3 min5.65 12733.86692,090 USD-49,159
EUR/USD2 min5.09 18829.79899,442 USD-53,696
Nikkei 22530 min1.34 41361.5026,803 USD-6,288
EUR/USD5 minn/a 8734.48521,711 USD-50,484
EUR/USD10 minn/a 4134.15204,818 USD-38,222
USD/JPY1 hourn/a 8161.73202,750 USD-84,590
EUR/USD15 minn/a 2931.03122,056 USD-35,870
EUR/USD30 minn/a 1855.56121,677 USD-27,398
USD/JPY30 minn/a 2378.2689,530 USD-51,710
EUR/USD1 hourn/a 4667.3968,753 USD-30,664
USD/JPY5 minn/a 3100.0044,910 USD-12,640
USD/JPY10 minn/a 666.6739,520 USD-30,080
EUR/USD4 hoursn/a 16460.3729,371 USD-16,320
Nikkei 2251 hourn/a 59554.4526,961 USD-6,895
USD/JPY3 minn/a 1100.0014,270 USD-5,320
Dow Jones1 hourn/a 15453.259,530 EUR-5,321
Nikkei 22515 minn/a 17559.438,979 USD-6,696
Nikkei 2255 minn/a 5360.388,760 USD-3,217
Nikkei 22510 minn/a 8256.107,003 USD-4,361
Dow Jones30 minn/a 12552.006,547 EUR-5,316
FTSE 100Dailyn/a 85137.136,512 EUR-3,511
DAX 4015 minn/a 14959.735,983 EUR-1,800
Nasdaq 10030 minn/a 42756.675,546 EUR-3,993
Dow Jones15 minn/a 11054.555,209 EUR-3,236
DAX 4030 minn/a 38552.214,686 EUR-3,205
FTSE 1001 hourn/a 47353.704,460 EUR-1,619
FTSE 1004 hoursn/a 55349.373,813 EUR-2,906
Brent Crude3 minn/a 16663.253,002 EUR-1,959
Silver1 minn/a 4070.002,579 USD-2,530
Dow Jones3 minn/a 862.501,819 EUR-1,430
US Crude Oil1 minn/a 7560.001,716 EUR-1,329
FTSE 10030 minn/a 20356.651,700 EUR-1,381
S&P 50015 minn/a 13758.391,291 EUR-591
S&P 5001 hourn/a 53648.321,164 EUR-1,043
S&P 50030 minn/a 24554.691,042 EUR-615
Gold2 minn/a 2576.00736 EUR-194
FTSE 10015 minn/a 8554.12730 EUR-661
Gold3 minn/a 2770.37726 EUR-336
DAX 402 minn/a 1100.00515 EUR-345
Nasdaq 1002 minn/a 2100.00473 EUR-258
Gold5 minn/a 3658.33389 EUR-350

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// EMA Deviation Reversion
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 3 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ema = ExponentialAverage[55](close)
body = ABS(close - open) / open * 100

17 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 barsEUR/USD · 3 min · older data 0.00 USD

On the long run with 997,000 bars the net result was 692,090 USD, against 692,090 USD on the standard 200,000-bar run. The older data alone gave 0 USD.

EUR/USD · 3 min

Bars available997,000
Net, standard 200,000-bar run692,090.00 USD
Net, long run692,090.00 USD
Net on the older data alone0.00 USD
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 Deviation Reversion 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 41 market and timeframe combinations. The best run was EUR/USD, 3 minutes, with a profit factor of 5.65 over 127 trades.

How large was the drawdown?

The best run had a maximum drawdown of 49,159 USD at the tested position size, against a net result of 692,090 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

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

Percent B Threshold Reversion

Also a mean reversion strategy.

5.66 PF · 2,377 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