Requires a reversal state built from a stochastic and an EMA(20) trend state to agree before entering. It buys when both are up, sells short when both are down, and closes any position when they disagree.
Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:23.
| 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.58 | 477 | 34.80 | 2,784,420 USD | -339,645 |
| Silver | 4 hours | n/a | 1,156 | 30.19 | 24,645 USD | -13,411 |
| Brent Crude | Daily | n/a | 187 | 33.69 | 13,455 EUR | -5,849 |
| Gold | 4 hours | n/a | 1,098 | 33.79 | 1,623 EUR | -984 |
Charts
The code
// ============================================================== // Reversal Pattern With EMA Trend Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
57 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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.58 over 477 trades.
The best run had a maximum drawdown of 339,645 USD at the tested position size, against a net result of 2,784,420 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.