Join waitlist
Strategies / Trend / Open Price Trailing Line Long

Open Price Trailing Line Long

A long-only system that applies a trailing line to the open price and buys when a fast weighted average crosses above it. It exits on a cross below or when the close moves 5% above or below the entry price.

TrendLong onlySwingUSD/JPY4 hours
n/aProfit factor
430,350Net profit USD
43.66%Win rate
1,633Trades
-255,720Max drawdown
264Avg trade

Best run of 13. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-10-USDJPY-4h-opt.tsv:8.

Entry rules, long

  1. The open is above the trailing line on this bar.
  2. The trailing line is built from the 11-bar ATR and ratchets with the open price.
  3. A long is entered only when no long is open.

Exit rules

  1. The long closes at market when the close is more than 5% above the entry price.
  2. The long closes at market when the close is more than 5% below the entry price.

Test conditions

PeriodUp to 2026-10-10
InstrumentUSD/JPY, 4 hours
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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run4 hoursn/a 1,63343.66430,350 USD-255,720
EUR/USDDailyn/a 68040.7445,664 USD-39,293
Dow JonesDailyn/a 73441.8325,915 EUR-6,847
Nikkei 2254 hoursn/a 1,19642.3920,109 USD-11,128
Nasdaq 100Dailyn/a 64944.6816,842 EUR-4,501
SilverDailyn/a 70742.7216,071 USD-6,962
DAX 404 hoursn/a 1,42544.2111,582 EUR-4,740
DAX 40Dailyn/a 1,05040.1911,035 EUR-4,020
Nasdaq 1004 hoursn/a 1,50042.4710,599 EUR-4,440
Brent Crude4 hoursn/a 87443.258,059 EUR-3,255
GoldDailyn/a 77839.331,854 EUR-721
Gold4 hoursn/a 1,37541.891,755 EUR-1,069
S&P 500Dailyn/a 80841.831,634 EUR-1,175

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Open Price Trailing Line Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE ts = 0

src = open
nloss = AverageTrueRange[11](close)
prev = ts

23 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

ATRWMA
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 255,720 USD is large next to the net profit of 430,350 USD.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Open Price Trailing Line Long 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 13 market and timeframe combinations. The best run by trade count was USD/JPY, 4 hours, with 1,633 trades.

How large was the drawdown?

The best run had a maximum drawdown of 255,720 USD at the tested position size, against a net result of 430,350 USD.

Does it trade long, short or both?

It only takes long trades.

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

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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