Buys or sells when the detrended price oscillator and a fast SMA cross in the same direction, confirmed by MACD and directional movement. The stop sits 0.087% beyond the slow SMA, with exits on the opposite SMA cross and reversals on opposite signals.
Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:20.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 16.29 | 475 | 1.26 | 1,032,210 USD | -105,570 |
| Silver | 1 hour | 3.81 | 3,918 | 20.88 | 546,947 USD | -38,870 |
| Dow Jones | Daily | n/a | 526 | 25.10 | 16,856 EUR | -7,695 |
| Gold | 4 hours | n/a | 974 | 27.31 | 906 EUR | -738 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // DPO SMA Crossover With MACD Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE state = 0 ONCE wason = 0 ONCE bsdpoup = 9999 ONCE bsdpodn = 9999 ONCE bsmaup = 9999 ONCE bsmadn = 9999 ONCE bsdiup = 9999 ONCE bsdidn = 9999 dpo = close - Average[12](close)
105 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 | 1,032,210.00 USD |
| Net, long run | 1,032,210.00 USD |
| Net on the older data alone | 0.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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 16.29 over 475 trades.
The best run had a maximum drawdown of 105,570 USD at the tested position size, against a net result of 1,032,210 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.