Join waitlist
Strategies / Momentum / Stochastic Reversal With KST Momentum

Stochastic Reversal With KST Momentum

The strategy buys at market when the stochastic reversal state is bullish and a weighted sum of four smoothed rate of change readings is positive, and sells short when both are bearish with that sum negative. Positions close when the two states disagree.

MomentumLong & shortSwingUSD/JPYDaily
1.87Profit factor
3,039,770Net profit USD
41.47%Win rate
299Trades
-497,700Max drawdown
10,166Avg trade

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

Entry rules, long

  1. The KST state turns bullish when its weighted sum of rate of change readings over 6, 10, 15 and 20 bars is above 0.
  2. A long opens at market when both states are bullish and no long position is open.

Entry rules, short

  1. The KST state turns bearish when its weighted sum of rate of change readings over 6, 10, 15 and 20 bars is below 0.
  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.87 29941.473,039,770 USD-497,700
USD/JPY1 hourn/a 3,23737.13625,610 USD-303,370
USD/JPY30 minn/a 4,56435.56535,400 USD-203,970
USD/JPY10 minn/a 4,70934.53226,120 USD-174,860
Brent CrudeDailyn/a 11437.7213,884 EUR-8,523
US Crude OilDailyn/a 25538.4311,840 EUR-9,683
DAX 4030 minn/a 4,67035.2910,885 EUR-5,773
US Crude Oil1 hourn/a 2,05736.516,729 EUR-4,652
Gold1 hourn/a 2,79934.412,490 EUR-793
Gold4 hoursn/a 70936.392,126 EUR-846
GoldDailyn/a 31539.371,814 EUR-971
S&P 500Dailyn/a 33235.841,721 EUR-1,583
Gold30 minn/a 4,65033.181,529 EUR-1,265

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE postwo = 0
ONCE sincebad = 1000

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

61 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 KST Momentum 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 13 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.87 over 299 trades.

How large was the drawdown?

The best run had a maximum drawdown of 497,700 USD at the tested position size, against a net result of 3,039,770 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

MACD RSI Volume Confirmation

Also a momentum strategy.

1.89 PF · 187 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