Trend Surfer builds a TDI from RSI(14): a 4 period price line and a 29 period middle band. It goes long when the price line is above the band and both sit above set levels, and goes short when the price line crosses below the band. Each trade uses a 250 point stop and a 50 point target.
Best run of 4. USD/JPY, 1 hour, spread 1, from run pf:2026-09-24-USDJPY-1h.tsv:1.
| Period | Up to 2026-09-25 |
| Instrument | USD/JPY, 1 hour |
| Spread | 1 points |
| Contracts | 1 |
| 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-09-25 |
| positionSize Contracts per trade | 1 |
| rsiPeriod RSI length feeding the TDI | 14 |
| priceLinePeriod TDI price line smoothing | 4 |
| middleBandPeriod TDI middle band length | 29 |
| longPriceLevel Longs need the price line above this | 35 |
| shortPriceLevel Shorts need the price line above this | 40 |
| middleBandLevel Longs need the middle band above this | 40 |
| stopLossPoints Protective stop in points | 250 |
| takeProfitPoints Target in points | 50 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 1 hour | 1.04 | 10,813 | 40.43 | 694,080 JPY | -171,550 |
| Silver | Daily | n/a | 1,376 | 55.81 | 22,511 USD | -7,333 |
| Gold | Daily | n/a | 1,097 | 43.03 | 2,152 EUR | -771 |
| Gold | 4 hours | n/a | 2,199 | 38.06 | 1,256 EUR | -1,006 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Trend Surfer // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 10000 // --- Parameters --- positionSize = 1 // contracts per trade rsiPeriod = 14 // RSI length feeding the TDI priceLinePeriod = 4 // TDI price line smoothing middleBandPeriod = 29 // TDI middle band length longPriceLevel = 35 // longs need the price line above this shortPriceLevel = 40 // shorts need the price line above this middleBandLevel = 40 // longs need the middle band above this stopLossPoints = 250 // protective stop in points takeProfitPoints = 50 // target in points // --- Indicators --- // Traders Dynamic Index: smoothed RSI against a slower RSI average rsiValue = RSI[rsiPeriod](CustomClose) priceLine = Average[priceLinePeriod](rsiValue) middleBand = Average[middleBandPeriod](rsiValue)
16 more lines: the entry and exit rules.
Read this first
Questions
Yes, it is a stop and reverse ProOrder system. The time windows seen in some versions were not in the tested code, so none are applied here.
USD/JPY 1 hour made JPY 694,080. Silver Daily made USD 22,511, Gold Daily EUR 2,151.9 and Gold 4 hours EUR 1,255.9.
Max drawdown on USD/JPY 1 hour was JPY 171,550. Each losing trade can cost up to 250 points plus spread.
The 1 hour chart produced enough signals for the small 50 point target to add up. Daily runs traded far less.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.