Join waitlist
Strategies / Trend / Four Trend Band Alignment

Four Trend Band Alignment

Buys when four ATR-based trailing trend lines all point up and sells short when all four point down. A position closes on the bar any one of the four trend lines changes direction.

TrendLong & shortIntradayDAX 4030 min
n/aProfit factor
6,464Net profit EUR
37.07%Win rate
4,227Trades
-6,387Max drawdown
1.53Avg trade

Best run of 8. DAX 40, 30 min, spread 3, from run sweeps:2026-10-12-DAX40-30m-opt.tsv:31.

Entry rules, long

  1. Bands sit 4, 3.618, 3.5 and 3.382 times ATR (7, 14, 21, 28 periods) from the median price.
  2. Signals are only considered after bar 60.

Entry rules, short

  1. Bands sit 4, 3.618, 3.5 and 3.382 times ATR (7, 14, 21, 28 periods) from the median price.
  2. Signals are only considered after bar 60.

Exit rules

  1. A short closes when any of the four trend readings changes, unless all four are now +1, in which case a long opens.
  2. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-12
InstrumentDAX 40, 30 minutes
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
DAX 40Best run30 minn/a 4,22737.076,464 EUR-6,387
USD/JPYDailyn/a 30037.671,547,490 USD-669,940
EUR/USDDailyn/a 27041.8592,581 USD-61,503
Nasdaq 100Dailyn/a 26536.608,905 EUR-4,658
Nasdaq 1005 minn/a 3,84536.156,189 EUR-3,077
Gold4 hoursn/a 62339.972,475 EUR-857
Gold30 minn/a 3,67436.341,852 EUR-1,233
Gold1 hourn/a 2,25837.691,674 EUR-904

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Four Trend Band Alignment
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE upa = 0
ONCE dna = 0
ONCE tra = 1
ONCE prevtra = 1
ONCE upb = 0
ONCE dnb = 0
ONCE trb = 1
ONCE prevtrb = 1
ONCE upc = 0
ONCE dnc = 0
ONCE trc = 1
ONCE prevtrc = 1
ONCE upd = 0
ONCE dnd = 0
ONCE trd = 1
ONCE prevtrd = 1

atra = AverageTrueRange[7](close)
pua = upa
pda = dna
prevtra = tra
rua = MedianPrice - 4 * atra
rda = MedianPrice + 4 * atra

100 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.
  • The maximum drawdown of 6,387 EUR is large next to the net profit of 6,464 EUR.

Questions

About this strategy

Can I run Four Trend Band Alignment 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 8 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 4,227 trades.

How large was the drawdown?

The best run had a maximum drawdown of 6,387 EUR at the tested position size, against a net result of 6,464 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