The strategy buys after a bullish momentum divergence and a growing candle body sequence while a smoothed kernel band state is bullish, and sells short on the mirror setup. Each trade has a stop at the 10-bar low or high from the signal.
Best run of 9. Brent Crude, 4 hours, spread 3, from run pf:2026-10-12-BRENT-4h.tsv:2.
| Period | Up to 2026-10-12 |
| Instrument | Brent Crude, 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Brent CrudeBest run | 4 hours | 2.02 | 117 | 37.61 | 7,131 EUR | -1,480 |
| USD/JPY | Daily | n/a | 181 | 2.21 | 292,710 USD | -77,060 |
| Silver | 1 hour | n/a | 857 | 29.40 | 22,903 USD | -16,699 |
| Nikkei 225 | Daily | n/a | 81 | 29.63 | 16,496 USD | -9,693 |
| Silver | 4 hours | n/a | 223 | 32.74 | 15,038 USD | -7,371 |
| Nasdaq 100 | 30 min | n/a | 1,258 | 27.03 | 5,722 EUR | -2,794 |
| US Crude Oil | 1 hour | n/a | 634 | 31.70 | 3,567 EUR | -2,867 |
| US Crude Oil | 4 hours | n/a | 145 | 30.34 | 2,939 EUR | -2,094 |
| Gold | Daily | n/a | 83 | 32.53 | 363 EUR | -326 |
Charts
The code
// ============================================================== // Kernel Band Divergence Pattern // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE os = 0 ONCE phcount = 0 ONCE plcount = 0 ONCE phoscl = 0 ONCE phoscp = 0 ONCE phupl = 0 ONCE phupp = 0 ONCE ploscl = 0 ONCE ploscp = 0 ONCE pldnl = 0 ONCE pldnp = 0 ONCE bslec = -1 ONCE bssec = -1 ONCE bsoszero = -1 ONCE bsosone = -1 ONCE bsbear = -1 ONCE bsbull = -1 ONCE wsum = 5.8845334831 IF BarIndex = 0 THEN $myW[0] = 0.0 $myW[1] = 0.1096089037 $myW[2] = 0.202408452 $myW[3] = 0.2824122755 $myW[4] = 0.3505122675 $myW[5] = 0.4070508345 $myW[6] = 0.4522440654 $myW[7] = 0.4863266642 $myW[8] = 0.5096126401 $myW[9] = 0.5225212734 $myW[10] = 0.5255856933 $myW[11] = 0.5194514583 $myW[12] = 0.5048687929 $myW[13] = 0.4826805456 $myW[14] = 0.4538071801 $myW[15] = 0.4192297342 $myW[16] = 0.3799714748 $myW[17] = 0.3370788537 $myW[18] = 0.2916022919 $myW[19] = 0.2445772626 $myW[20] = 0.197006093 $myW[21] = 0.1498408643 $myW[22] = 0.1039677425 $myW[23] = 0.0601930304 $myW[24] = 0.0192311853 $myW[25] = -0.0183050051 $myW[26] = -0.0519119383 $myW[27] = -0.0812003128 $myW[28] = -0.1058977946 $myW[29] = -0.1258492438 $myW[30] = -0.1410145506 $myW[31] = -0.1514641851 $myW[32] = -0.1573726022 $myW[33] = -0.1590096873 $myW[34] = -0.1567304634 $myW[35] = -0.1509633085 $myW[36] = -0.1421969626 $myW[37] = -0.130966618 $myW[38] = -0.1178394034 $myW[39] = -0.1033995793 $myW[40] = -0.0882337608 $myW[41] = -0.0729164804 $myW[42] = -0.0579963918 $myW[43] = -0.0439833967 $myW[44] = -0.0313369555 $myW[45] = -0.020455813 $myW[46] = -0.0116693401 $myW[47] = -0.0052306547 $myW[48] = -0.0013116482 $myW[49] = -0.0 ENDIF sm = Average[7](Average[7](close)) osc = sm - sm[7] up = highest[7](close) dn = lowest[7](close) chg = osc - osc[1]
117 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 9 market and timeframe combinations. The best run was Brent Crude, 4 hours, with a profit factor of 2.02 over 117 trades.
The best run had a maximum drawdown of 1,480 EUR at the tested position size, against a net result of 7,131 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.