Join waitlist
Strategies / Pattern / Stochastic Reversal With Down Bar Filter

Stochastic Reversal With Down Bar Filter

The strategy sells short after two consecutive lower closes while stochastic %K is above its 3-bar average and below 50, once 4 consecutive bars close at or below their open. Once latched, longs never trigger and shorts close when the reversal state turns +1.

PatternLong & shortSwingGBP/USD1 hour
n/aProfit factor
5,634Net profit USD
40.72%Win rate
1,105Trades
-3,713Max drawdown
5.10Avg trade

Best run of 4. GBP/USD, 1 hour, spread 1.5, from run sweeps:2026-10-11-GBPUSD-1h-opt.tsv:5.

Entry rules, short

  1. The down-bar counter reaches 4 when 4 consecutive bars close at or below their open, and the filter then stays on.
  2. Shorting 1 contract at market requires the reversal state at -1 and the latched filter.

Exit rules

  1. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-11
InstrumentGBP/USD, 1 hour
Spread1.5 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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GBP/USDBest run1 hourn/a 1,10540.725,634 USD-3,713
USD/JPYDailyn/a 7447.301,665,740 USD-760,190
Brent CrudeDailyn/a 3135.486,352 EUR-5,930
GBP/USD4 hoursn/a 24642.285,002 USD-2,961

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Stochastic Reversal With Down Bar Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE myK = 0
ONCE kvalid = 0
ONCE revpos = 0
ONCE counter = 0
ONCE posprice = 0

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

49 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 maximum drawdown of 3,713 USD is large next to the net profit of 5,634 USD.

Questions

About this strategy

Can I run Stochastic Reversal With Down Bar Filter 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 4 market and timeframe combinations. The best run by trade count was GBP/USD, 1 hour, with 1,105 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,713 USD at the tested position size, against a net result of 5,634 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

Color Code Candle Flip

Best run on the same market, GBP/USD.

1.56 PF · 3,285 trades

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 trades

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

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