Join waitlist
Strategies / Trend / ATR Trailing Line Crossover Long

ATR Trailing Line Crossover Long

Buys when the close crosses above an ATR trailing line set 3.5 times the 5-period ATR from price. Exits when the close crosses below the same line.

TrendLong onlySwingNasdaq 100Daily
2.24Profit factor
17,809Net profit EUR
49.38%Win rate
160Trades
-3,127Max drawdown
111Avg trade

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

Entry rules, long

  1. The trailing line ratchets up in uptrends and down in downtrends, at 3.5 times the 5-period ATR from the close.

Exit rules

  1. No stop or target is set.

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.24 16049.3817,809 EUR-3,127
S&P 500Daily1.89 20046.003,209 EUR-562
Nasdaq 10030 min1.14 2,53040.6312,862 EUR-2,644
USD/JPY30 minn/a 2,09039.57489,940 USD-168,720
EUR/USDDailyn/a 14842.5776,393 USD-39,430
Nikkei 225Dailyn/a 16347.2440,671 USD-11,763
Nikkei 2254 hoursn/a 31145.3425,947 USD-9,858
Silver4 hoursn/a 36639.3422,427 USD-17,756
Dow JonesDailyn/a 17140.9417,218 EUR-5,494
DAX 401 hourn/a 1,45441.2714,788 EUR-3,834
Brent CrudeDailyn/a 6245.1614,257 EUR-6,388
Dow Jones4 hoursn/a 13845.6512,459 EUR-5,620
Nikkei 2253 minn/a 2,31334.6712,389 USD-7,734
DAX 4030 minn/a 2,50739.0511,642 EUR-3,718
Nasdaq 1001 hourn/a 1,67141.7111,194 EUR-3,192
Nasdaq 1004 hoursn/a 45242.7010,807 EUR-3,543
Nasdaq 10015 minn/a 2,40136.159,277 EUR-4,270
DAX 404 hoursn/a 39141.949,139 EUR-3,698
US Crude OilDailyn/a 14544.838,321 EUR-5,256
Nasdaq 1005 minn/a 2,20638.678,200 EUR-3,901
Nasdaq 10010 minn/a 2,33036.577,453 EUR-6,638
DAX 40Dailyn/a 31343.134,842 EUR-4,587
Gold4 hoursn/a 36940.652,696 EUR-1,159
S&P 5004 hoursn/a 42645.312,654 EUR-809
Gold30 minn/a 2,16837.922,592 EUR-702
Gold1 hourn/a 1,33639.672,328 EUR-715
GoldDailyn/a 17640.911,947 EUR-1,171
S&P 5001 hourn/a 1,61540.621,939 EUR-696
Gold10 minn/a 2,13735.001,386 EUR-939

Charts

Results by run

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

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

DEFPARAM CumulateOrders = false

ONCE ts = 0

nloss = 3.5 * AverageTrueRange[5](close)
prev = ts

21 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

ATR
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 Line Crossover 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 29 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.24 over 160 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,127 EUR at the tested position size, against a net result of 17,809 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

Dual Stochastic Trend Confirmation

Also a trend strategy.

2.24 PF · 105 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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