Join waitlist
Strategies / Pattern / Stochastic Reversal With Three Bar Pattern

Stochastic Reversal With Three Bar Pattern

The strategy buys at market when the stochastic reversal state is bullish and a three-bar reversal pattern is bullish, and sells short when both are bearish. Positions close when the two states disagree.

PatternLong & shortSwingNikkei 225Daily
n/aProfit factor
33,381Net profit USD
46.91%Win rate
599Trades
-12,678Max drawdown
55.73Avg trade

Best run of 2. Nikkei 225, Daily, spread 10, from run sweeps:2026-10-12-NIKKEI-D-opt.tsv:90.

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. The state requires the current bar to have a higher high and higher low than the prior bar.
  3. A long opens at market when both states are bullish and no long position is open.

Entry rules, short

  1. The stochastic reversal state turns bearish when the close falls for two consecutive bars, %K(14) is above its 3-period average, and %K is below 50.
  2. The state requires the current bar to have a lower high and lower low than the prior bar.
  3. A short opens at market when both states are bearish and no short position is open.

Exit rules

  1. An open short closes at market when the two states are no longer both bearish.

Test conditions

PeriodUp to 2026-10-12
InstrumentNikkei 225, Daily
Spread10 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
Nikkei 225Best runDailyn/a 59946.9133,381 USD-12,678
Dow Jones4 hoursn/a 49346.6511,571 EUR-10,510

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Stochastic Reversal With Three Bar Pattern
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE sincebad = 1000
ONCE posbar = 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
  • No profit factor is available, because only sweep results exist for this strategy.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Stochastic Reversal With Three Bar Pattern 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 2 market and timeframe combinations. The best run by trade count was Nikkei 225, Daily, with 599 trades.

How large was the drawdown?

The best run had a maximum drawdown of 12,678 USD at the tested position size, against a net result of 33,381 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 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