Buys when the MACD histogram is positive and CCI(14) crosses above -100, and sells short when the histogram is negative and CCI crosses below 100. Stops sit at the 10-bar low or high, with a target 1.5 times the stop distance.
Best run of 5. US Crude Oil, 1 hour, spread 3, from run sweeps:2026-10-11-CRUDE-1h-opt.tsv:3.
| Period | Up to 2026-10-11 |
| Instrument | US Crude Oil, 1 hour |
| Spread | 3 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | 1 hour | n/a | 1,415 | 41.06 | 5,626 EUR | -2,767 |
| Silver | Daily | n/a | 124 | 44.35 | 20,053 USD | -14,281 |
| Silver | 4 hours | n/a | 439 | 36.22 | 15,433 USD | -11,710 |
| US Crude Oil | Daily | n/a | 150 | 50.00 | 2,652 EUR | -2,075 |
| Gold | Daily | n/a | 132 | 38.64 | 332 EUR | -236 |
Charts
The code
// ============================================================== // CCI MACD Swing Risk Reward // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE myCci = 0 tp = TypicalPrice tpma = Average[14](tp) myMd = 0 FOR myI = 0 TO 13 DO myMd = myMd + ABS(tp[myI] - tpma) NEXT myMd = myMd / 14
24 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 5 market and timeframe combinations. The best run by trade count was US Crude Oil, 1 hour, with 1,415 trades.
The best run had a maximum drawdown of 2,767 EUR at the tested position size, against a net result of 5,626 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.