Join waitlist
Strategies / Breakout / SMA Crossover ATR Band Long

SMA Crossover ATR Band Long

Buys when the 2-bar simple average of the close crosses above the 21-period EMA plus one 21-period ATR. Closes the long when that average crosses below the 21-period EMA minus the same ATR band.

BreakoutLong onlySwingNasdaq 100Daily
2.55Profit factor
21,856Net profit EUR
51.88%Win rate
160Trades
-3,442Max drawdown
137Avg trade

Best run of 31. Nasdaq 100, Daily, spread 3, from run pf:2026-10-12-NAS100-D.tsv:1.

Entry rules, long

Exit rules

  1. The 2-bar average of the close crosses under the 21-period EMA minus 1 times the 21-period ATR

Test conditions

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

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.55 16051.8821,856 EUR-3,442
Dow JonesDaily1.96 19044.2125,705 EUR-5,554
S&P 500Daily1.69 21940.643,358 EUR-794
USD/JPYDailyn/a 17739.55739,500 USD-505,250
USD/JPY1 hourn/a 1,63237.68600,080 USD-316,610
USD/JPY30 minn/a 2,29437.18519,210 USD-179,390
USD/JPY15 minn/a 2,37035.32227,800 USD-142,250
Nikkei 225Dailyn/a 16842.8640,794 USD-14,753
Nikkei 2254 hoursn/a 34542.0333,144 USD-9,332
Dow Jones4 hoursn/a 13644.8518,264 EUR-4,954
Nikkei 2253 minn/a 2,50734.9413,931 USD-7,068
Brent CrudeDailyn/a 6544.6212,796 EUR-8,680
DAX 401 hourn/a 1,41238.5312,088 EUR-3,740
Nasdaq 1004 hoursn/a 46541.2911,513 EUR-4,901
Nasdaq 10030 minn/a 2,50537.3310,647 EUR-3,211
DAX 40Dailyn/a 26538.1110,162 EUR-5,160
Nasdaq 1001 hourn/a 1,55038.719,535 EUR-4,505
Nasdaq 10015 minn/a 2,45736.268,451 EUR-5,105
Nasdaq 10010 minn/a 2,44735.968,412 EUR-7,078
DAX 4030 minn/a 2,47636.598,307 EUR-4,865
DAX 404 hoursn/a 42637.326,392 EUR-3,118
Nasdaq 1005 minn/a 2,42435.735,481 EUR-3,480
GoldDailyn/a 18940.213,220 EUR-809
Gold4 hoursn/a 39741.813,035 EUR-987
S&P 5004 hoursn/a 44841.072,492 EUR-881
Gold1 hourn/a 1,41738.252,428 EUR-720
Gold30 minn/a 2,27435.311,740 EUR-971
S&P 5001 hourn/a 1,59138.651,141 EUR-991
Gold15 minn/a 2,37732.141,035 EUR-988
Gold10 minn/a 2,44732.57988 EUR-893
Gold5 minn/a 2,44835.21935 EUR-583

Charts

Results by run

Top 10 of 31 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

// ==============================================================
// SMA Crossover ATR Band Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

price = Average[2](close)
avg = ExponentialAverage[21](close)
diff = AverageTrueRange[21](close) * 1
bull = avg + diff
bear = avg - diff

10 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

SMAEMAATR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run SMA Crossover ATR Band 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 31 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.55 over 160 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,442 EUR at the tested position size, against a net result of 21,856 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Two-Day Range Midline Cross

Also a breakout strategy.

2.52 PF · 114 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