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.
Best run of 21. USD/JPY, 30 min, spread 1, from run pf:2026-10-11-USDJPY-30m.tsv:1.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 30 minutes |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 30 min | 1.22 | 3,115 | 32.01 | 972,500 USD | -153,700 |
| USD/JPY | 1 hour | n/a | 2,196 | 32.33 | 754,100 USD | -289,280 |
| USD/JPY | Daily | n/a | 318 | 34.28 | 433,480 USD | -402,470 |
| USD/JPY | 15 min | n/a | 3,280 | 28.96 | 227,530 USD | -219,400 |
| EUR/USD | Daily | n/a | 284 | 36.62 | 41,123 USD | -18,605 |
| Nikkei 225 | 2 min | n/a | 3,263 | 27.34 | 14,316 USD | -11,637 |
| Nasdaq 100 | 15 min | n/a | 3,408 | 31.37 | 13,099 EUR | -4,778 |
| Nikkei 225 | 1 hour | n/a | 1,807 | 31.32 | 11,229 USD | -6,903 |
| Dow Jones | 4 hours | n/a | 210 | 35.24 | 9,780 EUR | -3,996 |
| Silver | 4 hours | n/a | 779 | 33.25 | 9,069 USD | -4,778 |
| GBP/USD | Daily | n/a | 336 | 36.90 | 7,719 USD | -3,499 |
| Nasdaq 100 | 30 min | n/a | 3,444 | 31.33 | 7,406 EUR | -6,270 |
| DAX 40 | 4 hours | n/a | 711 | 35.30 | 5,119 EUR | -4,018 |
| Dow Jones | Daily | n/a | 403 | 33.75 | 4,297 EUR | -4,288 |
| DAX 40 | 1 hour | n/a | 2,072 | 32.63 | 4,174 EUR | -2,696 |
| Nasdaq 100 | 5 min | n/a | 3,257 | 30.58 | 3,942 EUR | -3,541 |
| GBP/USD | 1 hour | n/a | 2,860 | 30.56 | 2,979 USD | -2,784 |
| Gold | 1 hour | n/a | 2,027 | 32.51 | 1,751 EUR | -1,019 |
| Gold | 4 hours | n/a | 648 | 36.42 | 1,592 EUR | -592 |
| Gold | 30 min | n/a | 3,414 | 31.46 | 1,493 EUR | -938 |
| S&P 500 | 4 hours | n/a | 651 | 35.48 | 1,230 EUR | -897 |
Charts
Top 10 of 21 runs. The full list is in the table above.
The code
// ============================================================== // 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
Questions
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.
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.
The best run had a maximum drawdown of 153,700 USD at the tested position size, against a net result of 972,500 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.