Join waitlist
Strategies / Volatility / Stochastic Reversal With Mass Index

Stochastic Reversal With Mass Index

The strategy buys at market when the stochastic reversal state is bullish and the 25-bar Mass Index is below 26.5, and sells short when both are bearish with the index above 26.5. Open positions close when the two states disagree.

VolatilityLong & shortSwingSilver1 hour
4.42Profit factor
612,415Net profit USD
43.50%Win rate
1,639Trades
-17,012Max drawdown
374Avg trade

Best run of 13. Silver, 1 hour, spread 2, from run pf:2026-10-12-SILVER-1h.tsv:13.

Entry rules, long

  1. The Mass Index state (EMA 9, sum 25) turns bullish when the index falls below 26.5 and bearish when it rises above 26.5.
  2. A long opens at market when both states are bullish and no long position is open.

Entry rules, short

  1. The Mass Index state turns bearish when the index rises above 26.5 and bullish when it falls below 26.5.
  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
InstrumentSilver, 1 hour
Spread2 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
SilverBest run1 hour4.42 1,63943.50612,415 USD-17,012
USD/JPYDailyn/a 19743.651,330,130 USD-604,280
USD/JPY1 hourn/a 1,99844.99441,510 USD-297,720
Nikkei 225Dailyn/a 16351.5344,277 USD-11,410
Silver4 hoursn/a 40944.9940,400 USD-17,083
Dow JonesDailyn/a 16848.2125,961 EUR-15,200
Nikkei 2254 hoursn/a 37644.1515,442 USD-11,466
DAX 40Dailyn/a 15747.1311,065 EUR-5,706
Nasdaq 1004 hoursn/a 48642.809,634 EUR-5,670
GBP/USD4 hoursn/a 46143.174,126 USD-3,777
S&P 500Dailyn/a 19645.413,200 EUR-1,274
Gold1 hourn/a 1,73443.372,656 EUR-883
Gold4 hoursn/a 42744.032,501 EUR-931

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 Mass Index
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Volatility
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE sincebad = 1000
ONCE posmass = 0

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

56 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

StochasticSMAEMA
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 Mass Index 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 Silver, 1 hour, with a profit factor of 4.42 over 1,639 trades.

How large was the drawdown?

The best run had a maximum drawdown of 17,012 USD at the tested position size, against a net result of 612,414 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

SMA Crossover With RSI Exit

Best run on the same market, Silver.

2.13 PF · 8,999 trades

Squeeze RSI Trailing Stop Long

Also a volatility strategy.

2.76 PF · 3,825 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