Join waitlist
Strategies / Breakout / Trendline Break With Supertrend Filter

Trendline Break With Supertrend Filter

The strategy trades breaks of trendlines drawn from swing highs and lows, filtered by a trend direction. It buys a break in an uptrend and sells short a break in a downtrend, with a 1.0% stop and 2.0% target.

BreakoutLong & shortIntradayUSD/JPY30 min
1.22Profit factor
972,500Net profit USD
32.01%Win rate
3,115Trades
-153,700Max drawdown
312Avg trade

Best run of 21. USD/JPY, 30 min, spread 1, from run pf:2026-10-11-USDJPY-30m.tsv:1.

Entry rules, long

  1. The trend state is up, set when the prior close is above the median price plus 3.0 times the 10-bar ATR.
  2. The close moves above the descending trendline, the latest swing high line that falls by ATR(14)/14 per bar.
  3. Buys one contract at market when the trend is up, after bar 30.

Entry rules, short

  1. The trend state is down, set when the prior close is below the median price minus 3.0 times the 10-bar ATR.
  2. The close moves below the ascending trendline, the latest swing low line that rises by ATR(14)/14 per bar.
  3. Sells short one contract at market when the trend is down, after bar 30.

Exit rules

  1. A short is covered at market when the trend turns up or the upper break flag switches on.
  2. Each trade has a 1.0% stop loss and a 2.0% profit target, measured from the fill price.

Test conditions

PeriodUp to 2026-10-11
InstrumentUSD/JPY, 30 minutes
Spread1 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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run30 min1.22 3,11532.01972,500 USD-153,700
USD/JPY1 hourn/a 2,19632.33754,100 USD-289,280
USD/JPYDailyn/a 31834.28433,480 USD-402,470
USD/JPY15 minn/a 3,28028.96227,530 USD-219,400
EUR/USDDailyn/a 28436.6241,123 USD-18,605
Nikkei 2252 minn/a 3,26327.3414,316 USD-11,637
Nasdaq 10015 minn/a 3,40831.3713,099 EUR-4,778
Nikkei 2251 hourn/a 1,80731.3211,229 USD-6,903
Dow Jones4 hoursn/a 21035.249,780 EUR-3,996
Silver4 hoursn/a 77933.259,069 USD-4,778
GBP/USDDailyn/a 33636.907,719 USD-3,499
Nasdaq 10030 minn/a 3,44431.337,406 EUR-6,270
DAX 404 hoursn/a 71135.305,119 EUR-4,018
Dow JonesDailyn/a 40333.754,297 EUR-4,288
DAX 401 hourn/a 2,07232.634,174 EUR-2,696
Nasdaq 1005 minn/a 3,25730.583,942 EUR-3,541
GBP/USD1 hourn/a 2,86030.562,979 USD-2,784
Gold1 hourn/a 2,02732.511,751 EUR-1,019
Gold4 hoursn/a 64836.421,592 EUR-592
Gold30 minn/a 3,41431.461,493 EUR-938
S&P 5004 hoursn/a 65135.481,230 EUR-897

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Trendline Break With Supertrend Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE upper = 0
ONCE lower = 0
ONCE slopeph = 0
ONCE slopepl = 0
ONCE haveph = 0
ONCE havepl = 0
ONCE upos = 0
ONCE dnos = 0
ONCE inup = 1

slope = AverageTrueRange[14](close) / 14 * 1.0
isph = 0
ispl = 0

71 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

ATRSuperTrend
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 Trendline Break With Supertrend Filter 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 21 market and timeframe combinations. The best run was USD/JPY, 30 minutes, with a profit factor of 1.22 over 3,115 trades.

How large was the drawdown?

The best run had a maximum drawdown of 153,700 USD at the tested position size, against a net result of 972,500 USD.

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

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Bollinger Breakout With RSI Direction

Also a breakout strategy.

1.23 PF · 513 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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