Join waitlist
Strategies / Momentum / Linear Regression RSI Crossover

Linear Regression RSI Crossover

The strategy buys when an RSI of a 50-period linear regression line crosses above its own 50-period EMA while price is above the 200-period EMA. It closes the long when that RSI crosses back below its EMA.

MomentumLong onlySwingGoldDaily
3.02Profit factor
3,282Net profit EUR
48.65%Win rate
111Trades
-809Max drawdown
29.57Avg trade

Best run of 31. Gold, Daily, spread 0.6, from run pf:2026-10-12-GOLD-D.tsv:3.

Entry rules, long

  1. The close is above the 200-period EMA of close.

Exit rules

  1. The 21-period RSI crosses below its 50-period EMA, and the long is closed.

Test conditions

PeriodUp to 2026-10-12
InstrumentGold, Daily
Spread0.6 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
GoldBest runDaily3.02 11148.653,282 EUR-809
Nasdaq 100Daily2.90 12446.7717,038 EUR-2,905
Gold30 min1.48 1,49039.263,295 EUR-570
USD/JPY30 min1.29 1,48441.24675,740 USD-119,720
DAX 4030 min1.22 1,60639.8511,774 EUR-2,401
USD/JPYDailyn/a 9245.65615,660 USD-293,400
USD/JPY1 hourn/a 1,04941.28389,190 USD-186,460
USD/JPY15 minn/a 1,64136.68206,510 USD-144,650
USD/JPY10 minn/a 1,72637.25197,880 USD-124,360
EUR/USDDailyn/a 8251.22108,235 USD-38,022
Silver30 minn/a 1,50236.8227,139 USD-12,287
Nikkei 225Dailyn/a 9744.3324,189 USD-9,477
Nikkei 22530 minn/a 1,50337.7921,243 USD-6,328
Silver4 hoursn/a 21744.2418,862 USD-14,759
Nikkei 2254 hoursn/a 23138.5314,764 USD-11,662
Silver3 minn/a 1,69632.9011,100 USD-9,620
Dow JonesDailyn/a 16142.248,487 EUR-7,218
GBP/USDDailyn/a 9143.967,619 USD-3,748
US Crude Oil30 minn/a 1,28139.816,434 EUR-2,827
Nasdaq 10030 minn/a 1,76540.576,363 EUR-4,169
DAX 401 hourn/a 96541.246,097 EUR-3,346
Brent CrudeDailyn/a 3043.335,673 EUR-5,566
Brent Crude30 minn/a 97139.245,425 EUR-2,351
Nasdaq 10015 minn/a 1,70439.203,702 EUR-3,161
Gold4 hoursn/a 24742.512,009 EUR-718
Gold1 hourn/a 92440.691,651 EUR-1,167
S&P 500Dailyn/a 16143.481,524 EUR-626
S&P 50030 minn/a 1,73140.611,059 EUR-786
Gold10 minn/a 1,59836.361,008 EUR-528
Gold3 minn/a 1,61834.30935 EUR-457
Gold5 minn/a 1,66935.17889 EUR-495

Charts

Results by run

Top 10 of 31 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

// ==============================================================
// Linear Regression RSI Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

lr = LinearRegression[50](close)
myRsi = RSI[21](lr)
ema = ExponentialAverage[50](myRsi)
trend = ExponentialAverage[200](close)

13 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

Linear RegressionRSIEMA
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 Linear Regression RSI Crossover 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 31 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 3.02 over 111 trades.

How large was the drawdown?

The best run had a maximum drawdown of 809 EUR at the tested position size, against a net result of 3,282 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 Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

TRIX Signal Line Trend Filter

Also a momentum strategy.

2.98 PF · 128 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