Join waitlist
Strategies / Momentum / Rainbow Oscillator Crossover

Rainbow Oscillator Crossover

Builds two composite oscillators from CCI, RSI and stochastic readings, with fast and slow lengths smoothed twice. It buys when the slow line crosses below the rising fast line and sells short on the opposite cross, with a 2% stop and 5% target.

MomentumLong & shortSwingUSD/JPYDaily
1.84Profit factor
1,754,060Net profit USD
45.56%Win rate
180Trades
-427,500Max drawdown
9,745Avg trade

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

Entry rules, long

  1. A long is opened at market on that cross when no long position is open.
  2. A 2% stop loss and 5% profit target are set from the entry price.

Entry rules, short

  1. A short is opened at market on that cross when no short position is open.
  2. A 2% stop loss and 5% profit target are set from the entry price.

Exit rules

  1. The stop loss and profit target close the trade if either is hit.

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.84 18045.561,754,060 USD-427,500
Gold1 hour1.29 1,09640.973,238 EUR-601
US Crude Oil10 min1.13 1,91540.1611,406 EUR-2,903
USD/JPY1 hourn/a 1,18942.47438,590 USD-241,120
USD/JPY30 minn/a 1,59841.61319,040 USD-252,980
Nasdaq 10030 minn/a 1,74337.589,444 EUR-5,511
GBP/USDDailyn/a 17637.506,136 USD-5,137
Nasdaq 1004 hoursn/a 37638.565,900 EUR-4,826
DAX 405 minn/a 1,77839.485,161 EUR-3,948
FTSE 100Dailyn/a 15635.903,533 EUR-2,332
Gold30 minn/a 1,67039.581,472 EUR-882
Gold10 minn/a 1,62438.491,111 EUR-886

Charts

Results by run

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

// ==============================================================
// Rainbow Oscillator Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE stf = 50
ONCE sts = 50

maf = Average[16](close)
mdf = 0
FOR myI = 0 TO 15 DO
    mdf = mdf + abs(close[myI] - maf)
NEXT
mdf = mdf / 16

52 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

CCIRSIStochasticWilder Average
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 Rainbow Oscillator 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 12 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.84 over 180 trades.

How large was the drawdown?

The best run had a maximum drawdown of 427,500 USD at the tested position size, against a net result of 1,754,060 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

Slow MACD Crossover Long

Also a momentum strategy.

1.84 PF · 122 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