Buys after a MACD histogram low pivot below zero when CCI(40) has reached -150 or below recently and price is above the 400 period SMA. Sells short on the mirrored high pivot setup when price is at or below that average.
Best run of 23. S&P 500, 1 hour, spread 1, from run pf:2026-10-04-USA500-1h.tsv:5.
| Period | Up to 2026-10-04 |
| Instrument | S&P 500, 1 hour |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | 1 hour | 1.42 | 532 | 64.85 | 2,777 EUR | -674 |
| USD/JPY | 1 hour | n/a | 593 | 63.24 | 536,360 USD | -167,980 |
| Nikkei 225 | 1 hour | n/a | 405 | 64.44 | 23,798 USD | -6,345 |
| Nikkei 225 | 4 hours | n/a | 108 | 62.96 | 21,701 USD | -10,257 |
| Dow Jones | Daily | n/a | 60 | 78.33 | 20,839 EUR | -7,180 |
| Silver | Daily | n/a | 42 | 73.81 | 19,808 USD | -9,676 |
| Nikkei 225 | Daily | n/a | 38 | 63.16 | 16,641 USD | -8,036 |
| Nikkei 225 | 30 min | n/a | 833 | 58.94 | 15,128 USD | -7,723 |
| Dow Jones | 1 hour | n/a | 165 | 67.88 | 12,348 EUR | -6,697 |
| Silver | 5 min | n/a | 800 | 55.12 | 11,496 USD | -5,766 |
| Nasdaq 100 | 1 hour | n/a | 529 | 65.78 | 11,459 EUR | -4,127 |
| Nasdaq 100 | 30 min | n/a | 889 | 60.07 | 11,448 EUR | -4,653 |
| Nasdaq 100 | Daily | n/a | 48 | 79.17 | 10,141 EUR | -3,953 |
| Nasdaq 100 | 4 hours | n/a | 154 | 70.13 | 7,919 EUR | -3,406 |
| Dow Jones | 4 hours | n/a | 50 | 70.00 | 7,464 EUR | -6,096 |
| DAX 40 | Daily | n/a | 56 | 69.64 | 7,041 EUR | -4,262 |
| US Crude Oil | 1 hour | n/a | 350 | 62.86 | 6,251 EUR | -3,502 |
| FTSE 100 | Daily | n/a | 41 | 73.17 | 4,150 EUR | -2,643 |
| S&P 500 | Daily | n/a | 58 | 75.86 | 2,856 EUR | -1,238 |
| S&P 500 | 4 hours | n/a | 150 | 72.67 | 2,291 EUR | -697 |
| Brent Crude | 1 min | n/a | 805 | 57.64 | 2,179 EUR | -1,831 |
| S&P 500 | 30 min | n/a | 903 | 60.02 | 1,852 EUR | -632 |
| GBP/USD | 5 min | n/a | 765 | 59.35 | 534 USD | -333 |
Charts
Top 10 of 23 runs. The full list is in the table above.
The code
// ============================================================== // MACD Histogram Pivot CCI Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false macdl = MACDline[24,52,18](close) macds = ExponentialAverage[18](macdl) hist = macdl - macds tp = (high + low + close) / 3 myCci = CCI[40](tp) sma = Average[400](close) myAdx = ADX[14] pivhigh = 1 pivlow = 1 FOR myK = 0 TO 10 DO
37 more lines: the entry and exit rules.
Setup
S&P 500 had no history beyond the standard run, so both runs used 114,000 bars.
| Bars available | 114,000 |
| Net, standard 200,000-bar run | 2,777.17 EUR |
| Net, long run | 2,777.17 EUR |
| Net on the older data alone | 0.00 EUR |
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 23 market and timeframe combinations. The best run was S&P 500, 1 hour, with a profit factor of 1.42 over 532 trades.
The best run had a maximum drawdown of 674 EUR at the tested position size, against a net result of 2,777 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.