Join waitlist
Strategies / Momentum / Trend Filtered Stochastic RSI Long

Trend Filtered Stochastic RSI Long

Buys in an uptrend when CCI(26) is below 100 and Stochastic RSI K and D are below 80 with K crossing above D. Closes the long when a weighted RSI line crosses below a dynamic upper line while Stochastic RSI K is above 80.

MomentumLong onlySwingS&P 5004 hours
2.32Profit factor
6,033Net profit EUR
69.80%Win rate
149Trades
-1,474Max drawdown
40.49Avg trade

Best run of 47. S&P 500, 4 hours, spread 1, from run pf:2026-10-12-USA500-4h.tsv:10.

Entry rules, long

  1. The 12-period simple moving average is above the 26-period simple moving average.
  2. CCI(26) of the close is below 100.
  3. Stochastic RSI K and D (RSI 14, stochastic 14, K smoothing 3, D smoothing 3) are both below 80.
  4. Stochastic RSI K and D (RSI 5, stochastic 5, K smoothing 4, D smoothing 3) are both below 80.

Exit rules

  1. The dynamic upper line is the 60-bar RSI high minus 0.1 times a 14-period weighted blend of the RSI range and low.
  2. The exit also requires Stochastic RSI K (RSI 14) above 80, with its range valid for at least 3 bars.

Test conditions

PeriodUp to 2026-10-13
InstrumentS&P 500, 4 hours
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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run4 hours2.32 14969.806,033 EUR-1,474
S&P 50030 min1.32 1,06358.895,333 EUR-1,208
USD/JPY30 minn/a 1,20156.37634,110 USD-250,590
USD/JPY10 minn/a 1,19359.68360,260 USD-255,720
USD/JPY15 minn/a 1,20157.04303,560 USD-272,740
Nikkei 225Dailyn/a 5959.3261,878 USD-28,186
Nikkei 2254 hoursn/a 15659.6250,332 USD-11,500
Nikkei 2251 hourn/a 53457.3050,155 USD-11,696
Dow JonesDailyn/a 7871.7946,258 EUR-11,142
Nikkei 22530 minn/a 1,11256.1244,215 USD-13,172
Nikkei 22515 minn/a 1,11755.8631,897 USD-10,481
Dow Jones30 minn/a 48458.2631,461 EUR-9,197
Nasdaq 100Dailyn/a 4676.0930,220 EUR-6,298
Nasdaq 1004 hoursn/a 16560.6124,997 EUR-6,396
Dow Jones4 hoursn/a 7068.5723,603 EUR-9,731
Nasdaq 10030 minn/a 1,07860.3922,850 EUR-7,952
Nasdaq 1001 hourn/a 66457.5322,582 EUR-7,616
Nikkei 2253 minn/a 1,12956.6921,522 USD-9,718
DAX 40Dailyn/a 8265.8521,482 EUR-5,780
Nasdaq 10015 minn/a 1,15459.1018,855 EUR-6,836
Dow Jones15 minn/a 99258.3718,522 EUR-10,681
Nikkei 22510 minn/a 1,09755.2418,512 USD-13,533
DAX 404 hoursn/a 18062.2217,451 EUR-6,140
Dow Jones1 hourn/a 22057.2716,697 EUR-10,420
DAX 401 hourn/a 58158.8614,453 EUR-4,589
Nasdaq 10010 minn/a 1,13457.5014,184 EUR-5,944
DAX 4030 minn/a 1,14559.2113,660 EUR-6,004
Dow Jones10 minn/a 1,17557.5312,930 EUR-10,258
DAX 4010 minn/a 1,23857.278,664 EUR-3,986
Nasdaq 1005 minn/a 1,15057.838,404 EUR-6,854
FTSE 100Dailyn/a 5660.718,242 EUR-3,662
DAX 4015 minn/a 1,21058.107,223 EUR-5,076
S&P 500Dailyn/a 7268.067,177 EUR-1,319
Brent Crude10 minn/a 1,18456.256,609 EUR-4,918
FTSE 1001 hourn/a 62857.805,900 EUR-2,873
Nasdaq 1002 minn/a 1,17456.395,796 EUR-4,689
S&P 5001 hourn/a 68159.185,605 EUR-1,420
FTSE 1004 hoursn/a 15957.864,564 EUR-3,740
FTSE 10030 minn/a 1,18657.764,386 EUR-2,659
S&P 50015 minn/a 1,19258.814,209 EUR-1,289
GoldDailyn/a 8155.563,387 EUR-1,541
Gold4 hoursn/a 21160.193,214 EUR-1,584
S&P 50010 minn/a 1,09756.612,754 EUR-1,436
Gold1 hourn/a 75057.332,506 EUR-1,488
Gold15 minn/a 1,22554.782,024 EUR-1,754
S&P 5005 minn/a 1,08657.271,667 EUR-1,506
FTSE 10010 minn/a 1,19157.771,587 EUR-1,438

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Trend Filtered Stochastic RSI Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE bada = 1000
ONCE badb = 1000

mafast = Average[12](close)
maslow = Average[26](close)

rsia = RSI[14](close)
hia = highest[14](rsia)
loa = lowest[14](rsia)

42 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

RSIStochasticSMACCIWMA
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 Trend Filtered Stochastic RSI Long 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 47 market and timeframe combinations. The best run was S&P 500, 4 hours, with a profit factor of 2.32 over 149 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,474 EUR at the tested position size, against a net result of 6,033 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

Time Series Momentum Long Short

Also a momentum strategy.

2.30 PF · 310 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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