Builds an on-balance volume line and buys when it crosses above its 190-period simple moving average. Sells when it crosses below its 202-period simple moving average, and holds only long positions.
Best run of 27. S&P 500, 1 hour, spread 1, from run pf:2026-10-05-USA500-1h.tsv:5.
| Period | Up to 2026-10-05 |
| Instrument | S&P 500, 1 hour |
| 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | 1 hour | 1.46 | 725 | 32.14 | 3,712 EUR | -860 |
| USD/JPY | Daily | n/a | 91 | 32.97 | 471,860 USD | -311,840 |
| USD/JPY | 15 min | n/a | 3,403 | 22.77 | 223,560 USD | -209,220 |
| Nikkei 225 | 10 min | n/a | 916 | 38.32 | 31,897 USD | -10,244 |
| Nikkei 225 | 4 hours | n/a | 296 | 32.43 | 25,889 USD | -16,414 |
| Nikkei 225 | 1 hour | n/a | 768 | 31.51 | 15,041 USD | -14,157 |
| Nasdaq 100 | 30 min | n/a | 1,356 | 30.60 | 14,078 EUR | -3,902 |
| DAX 40 | 30 min | n/a | 1,569 | 26.96 | 13,543 EUR | -3,564 |
| Nikkei 225 | 3 min | n/a | 1,312 | 31.10 | 12,776 USD | -8,959 |
| Nasdaq 100 | 15 min | n/a | 2,103 | 26.82 | 11,391 EUR | -6,754 |
| Nasdaq 100 | 1 hour | n/a | 698 | 29.66 | 10,992 EUR | -5,487 |
| Nikkei 225 | 1 min | n/a | 1,667 | 28.13 | 10,242 USD | -7,589 |
| Nasdaq 100 | 10 min | n/a | 2,175 | 28.46 | 9,868 EUR | -3,278 |
| Nasdaq 100 | Daily | n/a | 57 | 26.32 | 9,857 EUR | -8,375 |
| DAX 40 | Daily | n/a | 63 | 25.40 | 9,054 EUR | -3,843 |
| Nasdaq 100 | 4 hours | n/a | 204 | 33.82 | 8,184 EUR | -4,318 |
| DAX 40 | 1 hour | n/a | 794 | 28.21 | 7,932 EUR | -3,615 |
| Dow Jones | 1 hour | n/a | 527 | 31.69 | 7,889 EUR | -5,860 |
| DAX 40 | 10 min | n/a | 2,280 | 26.54 | 3,798 EUR | -3,728 |
| S&P 500 | 4 hours | n/a | 199 | 37.69 | 2,679 EUR | -704 |
| S&P 500 | 30 min | n/a | 1,288 | 28.73 | 2,601 EUR | -810 |
| S&P 500 | Daily | n/a | 61 | 42.62 | 2,400 EUR | -1,345 |
| Gold | 30 min | n/a | 3,990 | 35.69 | 2,196 EUR | -1,415 |
| Gold | 4 hours | n/a | 538 | 27.14 | 2,049 EUR | -1,549 |
| Gold | 1 hour | n/a | 2,058 | 22.45 | 1,136 EUR | -1,059 |
| S&P 500 | 10 min | n/a | 2,096 | 25.43 | 1,081 EUR | -720 |
| Gold | 10 min | n/a | 3,325 | 19.49 | 1,047 EUR | -994 |
Charts
Top 10 of 27 runs. The full list is in the table above.
The code
// ============================================================== // OBV Moving Average Crossover // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE obv = 0
21 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 114,000 bars.
| Bars available | 114,000 |
| Net, standard 200,000-bar run | 3,711.78 EUR |
| Net, long run | 3,706.20 EUR |
| Net on the older data alone | -5.58 EUR |
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 27 market and timeframe combinations. The best run was S&P 500, 1 hour, with a profit factor of 1.46 over 725 trades.
The best run had a maximum drawdown of 860 EUR at the tested position size, against a net result of 3,712 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.