Join waitlist
Strategies / Mean reversion / EMA Deviation Zone Long

EMA Deviation Zone Long

The idea buys when price is 3% or more below a 50 period EMA and closes above the prior close. It closes the long when price is 3% or more above the EMA and closes below the prior close.

Mean reversionLong onlySwingSilverDaily
n/aProfit factor
18,480Net profit USD
67.42%Win rate
89Trades
-9,578Max drawdown
208Avg trade

Best run of 46. Silver, Daily, spread 2, from run sweeps:2026-10-04-SILVER-D-opt.tsv:18.

Entry rules, long

  1. The close is at least 3% below the 50 period EMA, and the previous bar was also at least 3% below it.
  2. No long position is open.

Exit rules

  1. The close is at least 3% above the 50 period EMA, and the previous bar was also at least 3% above it.

Test conditions

PeriodUp to 2026-10-04
InstrumentSilver, Daily
Spread2 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
SilverBest runDailyn/a 8967.4218,480 USD-9,578
USD/JPY4 hoursn/a 475.00569,890 USD-239,360
USD/JPY30 minn/a 1100.00569,070 USD-244,650
USD/JPY1 hourn/a 366.67466,420 USD-269,500
EUR/USD2 minn/a 2352.17156,711 USD-51,089
Nikkei 2251 hourn/a 1668.7529,972 USD-11,743
Nikkei 22515 minn/a 875.0028,970 USD-5,829
Nikkei 22530 minn/a 1478.5728,366 USD-11,908
Dow JonesDailyn/a 5377.3627,771 EUR-8,615
Nikkei 2254 hoursn/a 2470.8322,239 USD-11,500
Nasdaq 1004 hoursn/a 3783.7818,853 EUR-5,672
Nasdaq 1001 hourn/a 2161.9017,262 EUR-5,831
Nasdaq 100Dailyn/a 6076.6713,010 EUR-3,922
Dow Jones4 hoursn/a 683.3313,001 EUR-9,070
DAX 40Dailyn/a 7972.1512,609 EUR-5,420
Nasdaq 10030 minn/a 1163.648,896 EUR-5,831
Nikkei 2255 minn/a 3100.007,456 USD-4,978
Dow Jones30 minn/a 666.677,394 EUR-4,570
DAX 401 hourn/a 2157.146,627 EUR-6,000
FTSE 100Dailyn/a 4173.176,239 EUR-3,597
US Crude Oil10 minn/a 1861.115,486 EUR-3,435
Nasdaq 10010 minn/a 2100.004,647 EUR-3,656
Dow Jones15 minn/a 475.003,639 EUR-2,734
US Crude Oil3 minn/a 1258.333,348 EUR-3,173
S&P 500Dailyn/a 5572.733,312 EUR-907
Gold1 hourn/a 1145.453,181 EUR-1,265
FTSE 1004 hoursn/a 1770.593,146 EUR-3,026
Dow Jones10 minn/a 1100.003,092 EUR-2,615
Gold30 minn/a 333.333,043 EUR-1,279
Gold15 minn/a 250.002,989 EUR-1,488
Dow Jones3 minn/a 1100.002,894 EUR-2,728
Dow Jones5 minn/a 1100.002,820 EUR-2,615
GBP/USD15 minn/a 1100.002,724 USD-1,326
Gold10 minn/a 1100.002,448 EUR-1,629
Gold4 hoursn/a 3167.742,400 EUR-667
S&P 50030 minn/a 683.332,218 EUR-1,314
S&P 5004 hoursn/a 1866.671,825 EUR-1,298
Nasdaq 1005 minn/a 1100.001,821 EUR-1,554
DAX 4010 minn/a 1100.001,600 EUR-1,207
S&P 5001 hourn/a 1369.231,436 EUR-1,317
Nasdaq 1003 minn/a 1100.001,089 EUR-550
GoldDailyn/a 5570.91938 EUR-856
S&P 50010 minn/a 1100.00483 EUR-407
S&P 5005 minn/a 1100.00427 EUR-407
FTSE 10010 minn/a 1100.00399 EUR-375
S&P 5003 minn/a 1100.00261 EUR-147

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Deviation Zone Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE zone = 0
ONCE prevok = 0
ONCE prevclose = 0

ema = ExponentialAverage[50](close)
diff = close / ema * 100 - 100

35 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 weaknesses4 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The best run has only 89 trades, which is a small sample to judge it on.
  • The maximum drawdown of 9,578 USD is large next to the net profit of 18,480 USD.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run EMA Deviation Zone Long 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 46 market and timeframe combinations. The best run by trade count was Silver, Daily, with 89 trades.

How large was the drawdown?

The best run had a maximum drawdown of 9,578 USD at the tested position size, against a net result of 18,480 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

SMA Crossover With RSI Exit

Best run on the same market, Silver.

2.13 PF · 8,999 trades

ATR Band

Also a mean reversion strategy.

10.31 PF · 53 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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