Join waitlist
Strategies / Momentum / KDJ J Line Trend Long

KDJ J Line Trend Long

The system buys when the J line crosses above the D line while close is above the 200-period SMA. It sells when D crosses above J or close falls below the SMA, with a stop 2% below entry and a target 20% above.

MomentumLong onlyIntradayEUR/USD2 min
3.77Profit factor
431,158Net profit USD
23.69%Win rate
3,892Trades
-46,093Max drawdown
111Avg trade

Best run of 23. EUR/USD, 2 min, spread 1, from run pf:2026-10-10-EURUSD-2m.tsv:1.

Entry rules, long

  1. The close is above the 200-period simple moving average.
  2. No long position is already open.

Exit rules

  1. The close falls below the 200-period simple moving average.
  2. A stop sits 2% below the fill price, and a target sits 20% above it.

Test conditions

PeriodUp to 2026-10-10
InstrumentEUR/USD, 2 minutes
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
EUR/USDBest run2 min3.77 3,89223.69431,158 USD-46,093
EUR/USD3 min3.46 3,86725.78467,702 USD-31,433
EUR/USD5 min2.77 3,85125.86311,876 USD-35,236
GoldDaily2.05 29435.712,995 EUR-634
EUR/USD10 min1.88 3,80128.15199,751 USD-44,980
USD/JPYDaily1.65 23837.391,314,480 USD-312,210
Gold4 hours1.54 66639.342,622 EUR-466
USD/JPY1 hourn/a 2,80735.23416,220 USD-173,090
USD/JPY30 minn/a 4,03234.00400,860 USD-108,370
USD/JPY4 hoursn/a 69439.34281,090 USD-135,860
EUR/USD15 minn/a 3,74529.72155,757 USD-41,025
EUR/USDDailyn/a 23839.0874,825 USD-29,373
EUR/USD4 hoursn/a 79837.3461,660 USD-15,952
EUR/USD1 hourn/a 3,31434.3747,633 USD-41,753
Silver4 hoursn/a 56936.2031,740 USD-8,285
Nikkei 2254 hoursn/a 59836.9619,740 USD-7,818
SilverDailyn/a 21024.7616,462 USD-5,833
Nikkei 225Dailyn/a 26534.7212,531 USD-10,031
GBP/USDDailyn/a 26940.157,290 USD-4,067
DAX 40Dailyn/a 41739.816,383 EUR-3,884
Nasdaq 1004 hoursn/a 79138.944,553 EUR-2,822
Brent CrudeDailyn/a 9834.693,494 EUR-2,096
Gold1 hourn/a 2,53433.981,551 EUR-492

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// KDJ J Line Trend Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 2 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE myK = 0
ONCE myD = 0

ma = Average[200](close)
hh = highest[14](high)
ll = lowest[14](low)

24 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

SMAStochastic
Longer historyRe-run on up to 1,000,000 barsEUR/USD · 2 min · older data 246,741.00 USD

On the long run with 996,000 bars the net result was 677,899 USD, against 431,158 USD on the standard 200,000-bar run. The older data alone gave 246,741 USD.

EUR/USD · 2 min

Bars available996,000
Net, standard 200,000-bar run431,158.00 USD
Net, long run677,899.00 USD
Net on the older data alone246,741.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run KDJ J Line Trend 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 23 market and timeframe combinations. The best run was EUR/USD, 2 minutes, with a profit factor of 3.77 over 3,892 trades.

How large was the drawdown?

The best run had a maximum drawdown of 46,093 USD at the tested position size, against a net result of 431,158 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

Typical Price RSI Trend Filter

Also a momentum strategy.

3.83 PF · 103 trades

Want strategies that are already part of a live portfolio? 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