Pairs a reversal state built from a smoothed stochastic with a Center of Gravity state based on a 5-bar linear regression. It buys when both states are up, sells short when both are down, and closes any position when they disagree.
Best run of 33. DAX 40, 4 hours, spread 3, from run pf:2026-10-05-DAX40-4h.tsv:3.
| Period | Up to 2026-10-05 |
| Instrument | DAX 40, 4 hours |
| 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 4 hours | 1.24 | 1,951 | 40.90 | 22,819 EUR | -4,192 |
| Nasdaq 100 | 4 hours | 1.20 | 2,079 | 39.39 | 16,499 EUR | -3,228 |
| USD/JPY | 30 min | 1.17 | 1,434 | 39.54 | 641,800 USD | -153,540 |
| USD/JPY | 4 hours | n/a | 1,553 | 39.60 | 566,720 USD | -217,440 |
| USD/JPY | 15 min | n/a | 541 | 41.77 | 400,250 USD | -177,200 |
| USD/JPY | 10 min | n/a | 384 | 41.93 | 328,960 USD | -148,330 |
| USD/JPY | 2 min | n/a | 20 | 55.00 | 68,640 USD | -68,020 |
| Nikkei 225 | 2 min | n/a | 876 | 39.95 | 32,195 USD | -12,435 |
| Nikkei 225 | 10 min | n/a | 2,798 | 37.49 | 30,811 USD | -13,982 |
| Nikkei 225 | 5 min | n/a | 1,805 | 39.06 | 28,883 USD | -10,962 |
| Silver | 4 hours | n/a | 2,466 | 34.63 | 24,362 USD | -15,436 |
| Dow Jones | Daily | n/a | 1,183 | 39.31 | 22,821 EUR | -10,296 |
| Nikkei 225 | 3 min | n/a | 1,267 | 38.20 | 21,069 USD | -9,236 |
| Nikkei 225 | 4 hours | n/a | 1,752 | 39.33 | 17,811 USD | -14,569 |
| Nikkei 225 | 1 min | n/a | 458 | 39.74 | 15,390 USD | -9,331 |
| Dow Jones | 1 hour | n/a | 1,272 | 37.19 | 12,078 EUR | -11,871 |
| Dow Jones | 4 hours | n/a | 622 | 38.91 | 9,043 EUR | -8,955 |
| Nasdaq 100 | 5 min | n/a | 1,159 | 39.09 | 8,263 EUR | -5,516 |
| Dow Jones | 10 min | n/a | 1,385 | 36.82 | 7,753 EUR | -7,548 |
| Nasdaq 100 | 15 min | n/a | 3,663 | 37.24 | 7,667 EUR | -6,307 |
| Nasdaq 100 | 10 min | n/a | 2,600 | 37.38 | 7,014 EUR | -6,706 |
| DAX 40 | 30 min | n/a | 4,723 | 36.52 | 6,411 EUR | -5,506 |
| Nasdaq 100 | 3 min | n/a | 775 | 39.87 | 5,978 EUR | -3,521 |
| DAX 40 | Daily | n/a | 1,250 | 37.12 | 5,811 EUR | -5,120 |
| DAX 40 | 5 min | n/a | 635 | 40.00 | 4,565 EUR | -3,199 |
| Nasdaq 100 | 2 min | n/a | 400 | 36.75 | 4,287 EUR | -4,009 |
| Gold | 4 hours | n/a | 1,976 | 37.65 | 2,962 EUR | -877 |
| S&P 500 | Daily | n/a | 1,214 | 38.30 | 2,041 EUR | -1,574 |
| Gold | 10 min | n/a | 1,816 | 39.76 | 1,813 EUR | -850 |
| Gold | Daily | n/a | 1,155 | 36.71 | 1,612 EUR | -1,595 |
| Gold | 5 min | n/a | 1,239 | 38.42 | 1,419 EUR | -659 |
| Gold | 15 min | n/a | 2,418 | 37.43 | 1,053 EUR | -812 |
| S&P 500 | 1 min | n/a | 42 | 50.00 | 502 EUR | -336 |
Charts
Top 10 of 33 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Reversal Pattern With Center of Gravity // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE poscog = 0 ONCE sincebad = 1000 ll = lowest[4](low) hh = highest[4](high)
60 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 33 market and timeframe combinations. The best run was DAX 40, 4 hours, with a profit factor of 1.24 over 1,951 trades.
The best run had a maximum drawdown of 4,192 EUR at the tested position size, against a net result of 22,819 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.