The strategy buys at market when the stochastic reversal state is bullish and over 50% of the last 20 bars closed higher than the prior close. The mirror rule sells short when both are bearish, and positions close when the states disagree.
Best run of 5. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:13.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.63 | 367 | 38.15 | 2,849,780 USD | -571,530 |
| Brent Crude | Daily | n/a | 147 | 36.73 | 11,183 EUR | -8,045 |
| US Crude Oil | Daily | n/a | 308 | 41.23 | 9,218 EUR | -8,457 |
| Gold | 1 hour | n/a | 3,671 | 36.45 | 1,896 EUR | -1,018 |
| Gold | Daily | n/a | 377 | 37.14 | 1,849 EUR | -926 |
Charts
The code
// ============================================================== // Stochastic Reversal With Psychological Line // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE pospsy = 0 ONCE sincebad = 1000 ll = lowest[14](low) hh = highest[14](high)
55 more lines: the entry and exit rules.
Setup
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 5 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.63 over 367 trades.
The best run had a maximum drawdown of 571,530 USD at the tested position size, against a net result of 2,849,780 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.