Join waitlist
Strategies / Trend / ATR Trailing Line Reversal

ATR Trailing Line Reversal

An always-in-market system that reverses on each crossing of a 10-bar ATR trailing line. It buys when price crosses above the line and sells short when it crosses below, with no stops or targets.

TrendLong & shortSwingDAX 404 hours
n/aProfit factor
14,401Net profit EUR
37.98%Win rate
3,655Trades
-6,605Max drawdown
3.94Avg trade

Best run of 2. DAX 40, 4 hours, spread 3, from run sweeps:2026-10-03-DAX40-4h-opt.tsv:21.

Entry rules, long

  1. The trailing line sits 1.0 times the 10-bar ATR below the close while rising, and ratchets toward price in the trend direction.
  2. A long is entered only when no long is open.

Entry rules, short

  1. The trailing line sits 1.0 times the 10-bar ATR above the close while falling, and ratchets toward price in the trend direction.
  2. A short is entered only when no short is open.

Exit rules

  1. There is no stop-loss or profit target.

Test conditions

PeriodUp to 2026-10-03
InstrumentDAX 40, 4 hours
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-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run4 hoursn/a 3,65537.9814,401 EUR-6,605
Gold4 hoursn/a 3,53736.082,149 EUR-796

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// ATR Trailing Line Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE tsl = 0

src = close
slv = 1.0 * AverageTrueRange[10](close)
prev = tsl[1]

22 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
  • 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 ATR Trailing Line Reversal 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 2 market and timeframe combinations. The best run by trade count was DAX 40, 4 hours, with 3,655 trades.

How large was the drawdown?

The best run had a maximum drawdown of 6,605 EUR at the tested position size, against a net result of 14,401 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 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.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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