Join waitlist
Strategies / Momentum / Stochastic Reversal With Up Bar Streak

Stochastic Reversal With Up Bar Streak

The strategy buys at market when the stochastic reversal state is bullish and a run of 4 bars closing at or above their open has occurred, a condition that then stays on. The long closes when the stochastic state is no longer bullish.

MomentumLong onlyIntradayUSD/JPY10 min
1.25Profit factor
565,110Net profit USD
42.38%Win rate
1,194Trades
-93,860Max drawdown
473Avg trade

Best run of 39. USD/JPY, 10 min, spread 1, from run pf:2026-10-12-USDJPY-10m.tsv:3.

Entry rules, long

  1. The stochastic reversal state turns bullish when the close rises for two consecutive bars, %K(14) is above 50, and %K is below its 3-period average.
  2. A long opens at market when both states are set and no long position is open.

Exit rules

  1. An open long closes at market when either state is no longer bullish.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, 10 minutes
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run10 min1.25 1,19442.38565,110 USD-93,860
Nasdaq 10030 min1.22 1,18445.1915,040 EUR-3,704
USD/JPY30 minn/a 1,18441.47605,640 USD-239,870
USD/JPY15 minn/a 1,20141.55420,790 USD-182,900
USD/JPY1 hourn/a 84444.08273,130 USD-272,460
Nikkei 225Dailyn/a 6744.7847,914 USD-10,546
Nikkei 2251 hourn/a 57644.4435,811 USD-9,318
Dow JonesDailyn/a 8554.1229,271 EUR-9,474
Nikkei 2254 hoursn/a 15944.0322,014 USD-9,005
Nikkei 22510 minn/a 1,20539.5018,765 USD-13,707
Nikkei 22515 minn/a 1,13941.0017,668 USD-14,166
Dow Jones15 minn/a 1,06939.9417,032 EUR-10,165
Dow Jones4 hoursn/a 6556.9216,215 EUR-8,205
DAX 4030 minn/a 1,27242.8515,994 EUR-4,879
Nasdaq 100Dailyn/a 7058.5715,933 EUR-5,632
DAX 40Dailyn/a 6953.6214,043 EUR-6,275
Dow Jones30 minn/a 54942.6212,703 EUR-9,741
Nasdaq 1001 hourn/a 78245.2712,466 EUR-5,422
Nasdaq 1004 hoursn/a 19448.9711,960 EUR-5,198
Nasdaq 10015 minn/a 1,26843.7711,719 EUR-4,279
Dow Jones1 hourn/a 29642.5711,382 EUR-7,549
Dow Jones5 minn/a 1,25638.469,008 EUR-6,550
DAX 401 hourn/a 78842.137,418 EUR-7,054
Brent CrudeDailyn/a 3240.627,289 EUR-6,949
DAX 404 hoursn/a 19043.167,125 EUR-5,385
Nasdaq 10010 minn/a 1,28740.796,923 EUR-5,612
DAX 4015 minn/a 1,25641.164,881 EUR-4,013
S&P 500Dailyn/a 8848.864,803 EUR-1,273
S&P 5001 hourn/a 79045.953,388 EUR-906
GoldDailyn/a 7143.662,822 EUR-1,387
FTSE 1004 hoursn/a 18545.412,647 EUR-2,550
Gold1 hourn/a 76041.842,497 EUR-1,324
Gold30 minn/a 1,17539.912,203 EUR-909
S&P 5004 hoursn/a 19349.222,152 EUR-997
Gold4 hoursn/a 18543.242,142 EUR-1,012
Gold10 minn/a 1,17739.931,778 EUR-1,263
S&P 5005 minn/a 1,17039.741,561 EUR-1,109
Gold5 minn/a 1,20040.581,541 EUR-1,050
S&P 50030 minn/a 1,11844.991,367 EUR-1,237

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Stochastic Reversal With Up Bar Streak
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 10 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE sincebad = 1000
ONCE cnt = 0
ONCE posprice = 0

ll = lowest[14](low)
hh = highest[14](high)

48 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

StochasticSMA
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 Stochastic Reversal With Up Bar Streak 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 39 market and timeframe combinations. The best run was USD/JPY, 10 minutes, with a profit factor of 1.25 over 1,194 trades.

How large was the drawdown?

The best run had a maximum drawdown of 93,860 USD at the tested position size, against a net result of 565,110 USD.

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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

RSI Stochastic MA Cross

Also a momentum strategy.

1.25 PF · 1,290 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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