Join waitlist
Strategies / Trend / EMA Crossover With ATR Bracket (long and short)

EMA Crossover With ATR Bracket (long and short)

The strategy buys when the 12-period EMA crosses above the 26-period EMA and sells short when it crosses below. Each trade has a stop set at 2 times the 14-period ATR and a target 1.5 times that stop distance.

TrendLong & shortSwingS&P 5004 hours
n/aProfit factor
2,880Net profit EUR
38.03%Win rate
1,094Trades
-1,161Max drawdown
2.63Avg trade

Best run of 9. S&P 500, 4 hours, spread 1, from run sweeps:2026-10-11-USA500-4h-opt.tsv:91.

Entry rules, long

  1. No long position is currently open
  2. The entry is placed at market, with a stop at 2 times the 14-period ATR and a target 1.5 times that stop distance

Entry rules, short

  1. No short position is currently open
  2. The entry is placed at market, with the same stop and target rules as long entries

Exit rules

  1. The stop loss is 2 times the 14-period ATR from the entry price
  2. The profit target is 1.5 times the stop distance from the entry price

Test conditions

PeriodUp to 2026-10-11
InstrumentS&P 500, 4 hours
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run4 hoursn/a 1,09438.032,880 EUR-1,161
Dow JonesDailyn/a 51034.5120,875 EUR-8,519
SilverDailyn/a 44338.8317,525 USD-16,577
Dow Jones4 hoursn/a 36341.3216,779 EUR-4,712
US Crude Oil4 hoursn/a 80438.6811,235 EUR-3,492
US Crude OilDailyn/a 39039.498,792 EUR-3,942
DAX 40Dailyn/a 48038.335,546 EUR-3,965
Gold4 hoursn/a 1,01838.411,723 EUR-681
GoldDailyn/a 48134.72863 EUR-733

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false

fast = ExponentialAverage[12](close)
slow = ExponentialAverage[26](close)
myAtr = Average[14](TR(close))

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

EMAATRTrue Range
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run EMA Crossover With ATR Bracket (long and short) 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 9 market and timeframe combinations. The best run by trade count was S&P 500, 4 hours, with 1,094 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,161 EUR at the tested position size, against a net result of 2,880 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 Sign With EMA Alignment

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

1.23 PF · 1,253 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 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