Join waitlist
Strategies / Momentum / Stochastic Reversal With Psychological Line

Stochastic Reversal With Psychological Line

The strategy buys at market when the stochastic reversal state is bullish and over 50% of the last 20 bars closed higher than the prior close. The mirror rule sells short when both are bearish, and positions close when the states disagree.

MomentumLong & shortSwingUSD/JPYDaily
1.63Profit factor
2,849,780Net profit USD
38.15%Win rate
367Trades
-571,530Max drawdown
7,765Avg trade

Best run of 5. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:13.

Entry rules, long

  1. The psychological line state turns bullish when over 50% of the last 20 bars closed higher than the prior close, and bearish when under 50%.
  2. A long opens at market when both states are bullish and no long position is open.

Entry rules, short

  1. The psychological line state turns bearish when under 50% of the last 20 bars closed higher than the prior close.
  2. 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
InstrumentUSD/JPY, Daily
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 runDaily1.63 36738.152,849,780 USD-571,530
Brent CrudeDailyn/a 14736.7311,183 EUR-8,045
US Crude OilDailyn/a 30841.239,218 EUR-8,457
Gold1 hourn/a 3,67136.451,896 EUR-1,018
GoldDailyn/a 37737.141,849 EUR-926

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Stochastic Reversal With Psychological Line
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE pospsy = 0
ONCE sincebad = 1000

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

55 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 Psychological Line 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 5 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.63 over 367 trades.

How large was the drawdown?

The best run had a maximum drawdown of 571,530 USD at the tested position size, against a net result of 2,849,780 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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

Market Cycle

Also a momentum strategy.

1.62 PF · 485 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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