Join waitlist
Strategies / Volatility / ATR Volatility Stop Long

ATR Volatility Stop Long

Buys when price closes above a volatility stop set 1 ATR(3) from the closing extremes, and closes the long when price falls below it. The stop trails the trend and resets when the trend flips.

VolatilityLong onlySwingDAX 404 hours
1.23Profit factor
22,598Net profit EUR
41.70%Win rate
2,204Trades
-2,664Max drawdown
10.25Avg trade

Best run of 7. DAX 40, 4 hours, spread 3, from run pf:2026-10-13-DAX40-4h.tsv:4.

Entry rules, long

  1. Entries are only taken after bar 20.

Exit rules

  1. The stop trails 1 ATR(3) below the highest close since the last trend flip and does not move down.

Test conditions

PeriodUp to 2026-10-13
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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run4 hours1.23 2,20441.7022,598 EUR-2,664
Dow JonesDailyn/a 1,01639.9612,101 EUR-10,536
Nikkei 2254 hoursn/a 1,86138.9011,190 USD-10,878
Nasdaq 1004 hoursn/a 2,32139.559,767 EUR-5,912
Nasdaq 100Dailyn/a 91538.806,423 EUR-6,098
GoldDailyn/a 1,00937.362,611 EUR-1,074
Gold4 hoursn/a 2,22237.891,754 EUR-1,070

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// ATR Volatility Stop Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Volatility
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE maxv = 0
ONCE minv = 0
ONCE up = 1
ONCE vstop = 0

myAtr = AverageTrueRange[3](close)

41 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 Volatility Stop 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 7 market and timeframe combinations. The best run was DAX 40, 4 hours, with a profit factor of 1.23 over 2,204 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,664 EUR at the tested position size, against a net result of 22,598 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

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

Stochastic Reversal With Statistical Volatility

Also a volatility strategy.

1.22 PF · 1,187 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