The system buys 1 contract when the J line of a KDJ stochastic rises above the D line. It exits when J turns down while in profit, or when J falls below D, and places a stop 2 times the 14-period ATR below entry.
Best run of 3. USD/JPY, Daily, spread 1, from run pf:2026-10-05-USDJPY-D.tsv:3.
| 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 | 4.17 | 6,135 | 5.49 | 4,005,500 USD | -334,460 |
| DAX 40 | 4 hours | n/a | 4,860 | 50.10 | 12,048 EUR | -4,596 |
| Dow Jones | Daily | n/a | 2,375 | 49.73 | 11,447 EUR | -8,377 |
Charts
The code
// ============================================================== // KDJ J Line Momentum Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE raw = 50 hh = highest[9](high) ll = lowest[9](low)
21 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 | 4,005,500.00 USD |
| Net, long run | 4,005,280.00 USD |
| Net on the older data alone | -220.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 3 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 4.17 over 6,135 trades.
The best run had a maximum drawdown of 334,460 USD at the tested position size, against a net result of 4,005,500 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.