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.
Best run of 12. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:31.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.84 | 180 | 45.56 | 1,754,060 USD | -427,500 |
| Gold | 1 hour | 1.29 | 1,096 | 40.97 | 3,238 EUR | -601 |
| US Crude Oil | 10 min | 1.13 | 1,915 | 40.16 | 11,406 EUR | -2,903 |
| USD/JPY | 1 hour | n/a | 1,189 | 42.47 | 438,590 USD | -241,120 |
| USD/JPY | 30 min | n/a | 1,598 | 41.61 | 319,040 USD | -252,980 |
| Nasdaq 100 | 30 min | n/a | 1,743 | 37.58 | 9,444 EUR | -5,511 |
| GBP/USD | Daily | n/a | 176 | 37.50 | 6,136 USD | -5,137 |
| Nasdaq 100 | 4 hours | n/a | 376 | 38.56 | 5,900 EUR | -4,826 |
| DAX 40 | 5 min | n/a | 1,778 | 39.48 | 5,161 EUR | -3,948 |
| FTSE 100 | Daily | n/a | 156 | 35.90 | 3,533 EUR | -2,332 |
| Gold | 30 min | n/a | 1,670 | 39.58 | 1,472 EUR | -882 |
| Gold | 10 min | n/a | 1,624 | 38.49 | 1,111 EUR | -886 |
Charts
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
// ============================================================== // 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
Questions
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.
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.
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.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.