Join waitlist
Strategies / Trend / EMA Cross With ATR Stops

EMA Cross With ATR Stops

Buys when EMA(21) crosses above EMA(55), with a stop 2 times ATR(14) below and a target 3 times ATR(14) above the entry. Closes the long when EMA(9) crosses under EMA(21).

TrendLong onlySwingS&P 500Daily
2.38Profit factor
2,023Net profit EUR
40.48%Win rate
126Trades
-331Max drawdown
16.06Avg trade

Best run of 11. S&P 500, Daily, spread 1, from run pf:2026-10-12-USA500-D.tsv:2.

Entry rules, long

  1. Entries start after bar 60 and only when flat.

Exit rules

  1. A stop loss sits 2 times ATR(14) below the fill, using the signal bar value.
  2. A profit target sits 3 times ATR(14) above the fill, using the signal bar value.

Test conditions

PeriodUp to 2026-10-12
InstrumentS&P 500, Daily
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best runDaily2.38 12640.482,023 EUR-331
Dow JonesDaily2.05 12547.2012,969 EUR-2,849
Nikkei 2254 hoursn/a 22741.859,174 USD-6,440
Nasdaq 100Dailyn/a 9549.477,450 EUR-1,747
Dow Jones4 hoursn/a 9644.796,344 EUR-3,601
US Crude Oil4 hoursn/a 20641.264,964 EUR-1,426
Dow Jones30 minn/a 70737.484,701 EUR-4,209
USD/JPYDailyn/a 10140.592,210 USD-2,200
Brent Crude4 hoursn/a 16442.071,827 EUR-1,536
S&P 5001 hourn/a 1,06739.641,364 EUR-355
S&P 5004 hoursn/a 27844.961,345 EUR-510

Charts

Results by run

Top 10 of 11 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 Cross With ATR Stops
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE sl = 0
ONCE tp = 0

slowema = ExponentialAverage[55](close)
midema = ExponentialAverage[21](close)
fastema = ExponentialAverage[9](close)
myAtr = AverageTrueRange[14](close)

14 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
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 Cross With ATR Stops 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 S&P 500, Daily, with a profit factor of 2.38 over 126 trades.

How large was the drawdown?

The best run had a maximum drawdown of 331 EUR at the tested position size, against a net result of 2,023 EUR.

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

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

Parabolic SAR Flip Risk Reward

Also a trend strategy.

2.36 PF · 250 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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