Join today
Strategies / Trend / Trend Surfer

Trend Surfer: TDI signals with a wide stop and tight target

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.

TrendLong & shortSwingUSD/JPY1 hour
1.04Profit factor
694,080Net profit JPY
40.43%Win rate
10,813Trades
-171,550Max drawdown
64.19Avg trade

Best run of 4. USD/JPY, 1 hour, spread 1, from run pf:2026-09-24-USDJPY-1h.tsv:1.

Entry rules, long

  1. Members only
  2. The price line is above 35
  3. The middle band is above 40
  4. No long is open

Entry rules, short

  1. Members only
  2. The price line is above 40
  3. No short is open

Exit rules

  1. Stop loss of 250 points
  2. Members only
  3. An opposite signal reverses the position

Test conditions

PeriodUp to 2026-09-25
InstrumentUSD/JPY, 1 hour
Spread1 points
Contracts1
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-09-25

Parameters

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

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run1 hour1.04 10,81340.43694,080 JPY-171,550
SilverDailyn/a 1,37655.8122,511 USD-7,333
GoldDailyn/a 1,09743.032,152 EUR-771
Gold4 hoursn/a 2,19938.061,256 EUR-1,006

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-200K-100K500K1.0MUSD/JPY · 1 hourSilver · DailyGold · DailyGold · 4 hours

The code

ProBuilder, rewritten to house standard

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

Known weaknesses

  • Profit factor on the best run was only 1.04, so gains and losses nearly cancel out and small extra costs could turn it negative.
  • The 250 point stop is five times the 50 point target, so one loss can erase several wins.
  • The best run needed 10,813 trades, so results depend heavily on low spread.
  • Only four runs exist, on USD/JPY, Silver and Gold, and the other three have no profit factor recorded.

Indicators used

RSITraders Dynamic IndexSMA

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can Trend Surfer run in ProOrder?

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.

Which instruments were tested?

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.

What risk comes with 1 contract?

Max drawdown on USD/JPY 1 hour was JPY 171,550. Each losing trade can cost up to 250 points plus spread.

Why 1 hour bars?

The 1 hour chart produced enough signals for the small 50 point target to add up. Daily runs traded far less.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Supertrend Counter Trend

Best run on the same market, USD/JPY.

3.47 PF · 1,444 trades

Donchian Channel Breakout

A similar profit factor.

1.04 PF · 3,444 trades

Discuss TDI and other RSI tools with ProRealTime traders. 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