Join waitlist
Strategies / Trend / EMA Pullback With ATR Bracket

EMA Pullback With ATR Bracket

The strategy buys a pullback to the 9-period EMA in an uptrend with price above the 50-period EMA, once price closes back above the 9-period EMA, and sells short on the mirror. Each trade uses a stop of 2 ATR(14) and a target of 3 ATR(14) from entry.

TrendLong & shortSwingNasdaq 1004 hours
1.34Profit factor
8,819Net profit EUR
44.17%Win rate
480Trades
-1,899Max drawdown
18.37Avg trade

Best run of 11. Nasdaq 100, 4 hours, spread 3, from run pf:2026-10-10-NAS100-4h.tsv:1.

Entry rules, long

  1. The close is above the 50-period EMA, and the 9-period EMA is above the 21-period EMA.
  2. The bar's low is at or below the 9-period EMA but at or above 0.9995 times the 21-period EMA.
  3. Only one trade is taken per crossing of the 9-period and 21-period EMAs.
  4. Signals start after the first 60 bars.

Entry rules, short

  1. The close is below the 50-period EMA, and the 9-period EMA is below the 21-period EMA.
  2. The bar's high is at or above the 9-period EMA but at or below 1.0005 times the 21-period EMA.
  3. Only one trade is taken per crossing of the 9-period and 21-period EMAs.
  4. Signals start after the first 60 bars.

Exit rules

  1. An opposite signal closes the trade and reverses it.

Test conditions

PeriodUp to 2026-10-10
InstrumentNasdaq 100, 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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run4 hours1.34 48044.178,819 EUR-1,899
Silver4 hoursn/a 46437.9319,485 USD-13,986
US Crude OilDailyn/a 17648.3010,488 EUR-2,946
Dow Jones4 hoursn/a 15744.5910,391 EUR-4,539
Nikkei 225Dailyn/a 17140.359,201 USD-7,531
USD/JPYDailyn/a 20342.868,460 USD-3,830
Nasdaq 100Dailyn/a 17536.577,174 EUR-5,189
Brent CrudeDailyn/a 6851.476,175 EUR-3,603
DAX 404 hoursn/a 48540.004,185 EUR-2,366
Brent Crude1 hourn/a 1,05440.043,623 EUR-2,805
FTSE 1004 hoursn/a 47842.473,324 EUR-1,721

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Pullback With ATR Bracket
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE taken = 0

emafast = ExponentialAverage[9](close)
emaslow = ExponentialAverage[21](close)
ematrend = ExponentialAverage[50](close)
myAtr = AverageTrueRange[14](close)

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

EMAATR
Longer historyRe-run on up to 1,000,000 barsNasdaq 100 · 4 hours · older data 0.00 EUR

Nasdaq 100 had no history beyond the standard run, so both runs used 28,000 bars.

Nasdaq 100 · 4 hours

Bars available28,000
Net, standard 200,000-bar run8,818.90 EUR
Net, long run8,818.90 EUR
Net on the older data alone0.00 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 Pullback With ATR 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 11 market and timeframe combinations. The best run was Nasdaq 100, 4 hours, with a profit factor of 1.34 over 480 trades.

How large was the drawdown?

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

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

SuperTrend Flip With RSI Filter

Also a trend strategy.

1.34 PF · 283 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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