Join waitlist
Strategies / Trend / ATR Trailing Stop Crossover

ATR Trailing Stop Crossover

A trailing stop line sits 3 ATR(20) from the highest close in an uptrend or the lowest close in a downtrend. The system buys when the close crosses above that line and sells when it crosses below.

TrendLong onlySwingNasdaq 100Daily
2.09Profit factor
20,005Net profit EUR
46.31%Win rate
203Trades
-4,427Max drawdown
98.55Avg trade

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

Entry rules, long

  1. The stop line sits 3 times ATR(20) below the highest close since the last flip, and only moves upward in an uptrend.

Exit rules

  1. The close crosses below the stop line, and the long is sold.

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.09 20346.3120,005 EUR-4,427
USD/JPYDailyn/a 22740.53724,280 USD-555,110
USD/JPY30 minn/a 2,97237.72474,500 USD-192,960
USD/JPY1 hourn/a 2,05638.96412,490 USD-284,760
Silver4 hoursn/a 45737.8633,473 USD-13,159
Nikkei 2254 hoursn/a 41841.8727,324 USD-14,460
Dow JonesDailyn/a 21542.7925,184 EUR-8,885
Nikkei 225Dailyn/a 23339.9124,821 USD-15,707
Nikkei 2251 hourn/a 1,65238.1416,189 USD-10,262
DAX 4030 minn/a 3,41037.2412,693 EUR-3,569
Nasdaq 1001 hourn/a 2,19138.6111,621 EUR-3,968
Nasdaq 1004 hoursn/a 56540.8810,455 EUR-6,322
Nasdaq 10015 minn/a 3,37537.729,957 EUR-4,905
DAX 401 hourn/a 1,90539.429,893 EUR-3,931
Dow Jones4 hoursn/a 18238.469,510 EUR-6,746
Nasdaq 10030 minn/a 3,56738.139,245 EUR-4,108
Nasdaq 10010 minn/a 3,32438.009,032 EUR-6,440
Nasdaq 1005 minn/a 3,14837.366,855 EUR-3,593
DAX 404 hoursn/a 52641.255,861 EUR-3,564
Gold4 hoursn/a 48242.323,227 EUR-1,063
S&P 500Dailyn/a 26240.842,918 EUR-1,030
Gold30 minn/a 3,06937.212,553 EUR-746
GoldDailyn/a 23341.632,483 EUR-1,325
S&P 5004 hoursn/a 55342.132,474 EUR-1,094
Gold1 hourn/a 1,81439.142,390 EUR-814
S&P 50030 minn/a 3,49237.891,322 EUR-1,141

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// ATR Trailing Stop Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE init = 0
ONCE vmax = 0
ONCE vmin = 0
ONCE uptrend = 1
ONCE vstop = 0

45 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

ATRTrue Range
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 ATR Trailing Stop Crossover 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 26 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.09 over 203 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,427 EUR at the tested position size, against a net result of 20,005 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

DSL Oscillator Band Risk Reward

Also a trend strategy.

2.08 PF · 136 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