Join waitlist
Strategies / Breakout / RSI Range Compression Breakout

RSI Range Compression Breakout

The idea buys when RSI(14) breaks above its prior 20-bar high after its range has compressed, with EMA(50) above its value 5 bars earlier and ADX(14) at or above 15. It sells short on the mirror-image break below its 20-bar low.

BreakoutLong & shortSwingUSD/JPYDaily
4.80Profit factor
172,490Net profit USD
20.23%Win rate
257Trades
-35,550Max drawdown
671Avg trade

Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:2.

Entry rules, long

  1. EMA[50] is above its value 5 bars earlier and ADX[14] is at or above 15
  2. Buys 1 contract at market when flat, with a stop 2 times ATR[14] from the fill; the long target formula is (close minus stop distance) times 2

Entry rules, short

  1. EMA[50] is below its value 5 bars earlier and ADX[14] is at or above 15
  2. Sells 1 contract short at market when flat, with a stop 2 times ATR[14] from the fill and a target at 2 times the stop distance

Exit rules

  1. Entries are blocked while a trade is open, so only one position is held

Test conditions

PeriodUp to 2026-10-04
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily4.80 25720.23172,490 USD-35,550
Silver4 hoursn/a 39336.9011,438 USD-7,196
FTSE 100Dailyn/a 1100.009,254 EUR-3,643
DAX 404 hoursn/a 36033.335,436 EUR-2,588

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// RSI Range Compression Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE bss = 100000

myRsi = RSI[14](close)
rsihigh = highest[20](myRsi)
rsilow = lowest[20](myRsi)
rsirange = rsihigh - rsilow

ema = ExponentialAverage[50](close)

40 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

RSIEMAADXATR
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run172,490.00 USD
Net, long run172,490.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run RSI Range Compression Breakout 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 was USD/JPY, Daily, with a profit factor of 4.80 over 257 trades.

How large was the drawdown?

The best run had a maximum drawdown of 35,550 USD at the tested position size, against a net result of 172,490 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

Volatility Expansion Breakout

Also a breakout strategy.

4.53 PF · 458 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