Join waitlist
Strategies / Momentum / OBV Moving Average Crossover

OBV Moving Average Crossover

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.

MomentumLong onlySwingS&P 5001 hour
1.46Profit factor
3,712Net profit EUR
32.14%Win rate
725Trades
-860Max drawdown
5.12Avg trade

Best run of 27. S&P 500, 1 hour, spread 1, from run pf:2026-10-05-USA500-1h.tsv:5.

Entry rules, long

  1. No long position is open.

Exit rules

  1. The OBV line crosses below its 202-period simple moving average, closing the long.

Test conditions

PeriodUp to 2026-10-05
InstrumentS&P 500, 1 hour
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-07

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run1 hour1.46 72532.143,712 EUR-860
USD/JPYDailyn/a 9132.97471,860 USD-311,840
USD/JPY15 minn/a 3,40322.77223,560 USD-209,220
Nikkei 22510 minn/a 91638.3231,897 USD-10,244
Nikkei 2254 hoursn/a 29632.4325,889 USD-16,414
Nikkei 2251 hourn/a 76831.5115,041 USD-14,157
Nasdaq 10030 minn/a 1,35630.6014,078 EUR-3,902
DAX 4030 minn/a 1,56926.9613,543 EUR-3,564
Nikkei 2253 minn/a 1,31231.1012,776 USD-8,959
Nasdaq 10015 minn/a 2,10326.8211,391 EUR-6,754
Nasdaq 1001 hourn/a 69829.6610,992 EUR-5,487
Nikkei 2251 minn/a 1,66728.1310,242 USD-7,589
Nasdaq 10010 minn/a 2,17528.469,868 EUR-3,278
Nasdaq 100Dailyn/a 5726.329,857 EUR-8,375
DAX 40Dailyn/a 6325.409,054 EUR-3,843
Nasdaq 1004 hoursn/a 20433.828,184 EUR-4,318
DAX 401 hourn/a 79428.217,932 EUR-3,615
Dow Jones1 hourn/a 52731.697,889 EUR-5,860
DAX 4010 minn/a 2,28026.543,798 EUR-3,728
S&P 5004 hoursn/a 19937.692,679 EUR-704
S&P 50030 minn/a 1,28828.732,601 EUR-810
S&P 500Dailyn/a 6142.622,400 EUR-1,345
Gold30 minn/a 3,99035.692,196 EUR-1,415
Gold4 hoursn/a 53827.142,049 EUR-1,549
Gold1 hourn/a 2,05822.451,136 EUR-1,059
S&P 50010 minn/a 2,09625.431,081 EUR-720
Gold10 minn/a 3,32519.491,047 EUR-994

Charts

Results by run

Top 10 of 27 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

VolumeSMA
Longer historyRe-run on up to 1,000,000 barsS&P 500 · 1 hour · older data -5.58 EUR

S&P 500 had no history beyond the standard run, so both runs used 114,000 bars.

S&P 500 · 1 hour

Bars available114,000
Net, standard 200,000-bar run3,711.78 EUR
Net, long run3,706.20 EUR
Net on the older data alone-5.58 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run OBV Moving Average Crossover in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 860 EUR at the tested position size, against a net result of 3,712 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

MACD Zero Line Downside Crossover

Also a momentum strategy.

1.47 PF · 203 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs