The strategy draws a resistance line through recent pivot highs and a support line through recent pivot lows. It buys 1 contract when the close crosses above resistance, is above the 20 period Hull average and RSI(14) is below 70, and shorts the mirror image.
Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-05-USDJPY-D.tsv:7.
| Period | Up to 2026-10-05 |
| Instrument | USD/JPY, Daily |
| 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.48 | 1,461 | 38.74 | 70,950 USD | -12,850 |
| Dow Jones | Daily | n/a | 704 | 33.95 | 20,733 EUR | -9,925 |
| Brent Crude | Daily | n/a | 284 | 40.85 | 11,194 EUR | -5,950 |
| US Crude Oil | 4 hours | n/a | 1,322 | 33.81 | 8,975 EUR | -4,866 |
Charts
The code
// ============================================================== // Pivot Trendline Breakout (long and short) // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE phone = 0 ONCE phtwo = 0 ONCE phoneidx = 0 ONCE phtwoidx = 0 ONCE plone = 0 ONCE pltwo = 0 ONCE ploneidx = 0 ONCE pltwoidx = 0 ONCE nph = 0 ONCE npl = 0 ONCE res = 0 ONCE sup = 0 hma = WeightedAverage[4](2 * WeightedAverage[10](close) - WeightedAverage[20](close)) myRsi = RSI[14](close) myAtr = AverageTrueRange[14](close)
41 more lines: the entry and exit rules.
Setup
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 70,950.00 USD |
| Net, long run | 70,950.00 USD |
| Net on the older data alone | 0.00 USD |
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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.48 over 1,461 trades.
The best run had a maximum drawdown of 12,850 USD at the tested position size, against a net result of 70,950 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.