Uses a normalized flux line and a guide line to set a polarity of +1 or -1 when both agree in sign. It buys at +1, and sells short when polarity flips from +1 to -1.
Best run of 28. Gold, Daily, spread 0.6, from run pf:2026-10-12-GOLD-D.tsv:13.
| Period | Up to 2026-10-12 |
| Instrument | Gold, Daily |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | Daily | 2.19 | 213 | 44.13 | 3,936 EUR | -809 |
| Dow Jones | 4 hours | 1.92 | 153 | 46.41 | 28,339 EUR | -5,565 |
| DAX 40 | 30 min | 1.20 | 2,751 | 40.20 | 22,215 EUR | -3,951 |
| USD/JPY | 1 hour | n/a | 2,093 | 41.61 | 791,330 USD | -291,450 |
| USD/JPY | 30 min | n/a | 2,786 | 39.05 | 775,380 USD | -266,650 |
| USD/JPY | 15 min | n/a | 2,862 | 37.81 | 575,250 USD | -272,250 |
| USD/JPY | 10 min | n/a | 2,968 | 38.58 | 448,680 USD | -177,080 |
| USD/JPY | 4 hours | n/a | 539 | 38.40 | 387,750 USD | -305,550 |
| Nikkei 225 | 4 hours | n/a | 379 | 41.42 | 46,630 USD | -14,096 |
| Nikkei 225 | Daily | n/a | 157 | 42.04 | 38,744 USD | -22,439 |
| Silver | Daily | n/a | 161 | 39.13 | 35,219 USD | -25,287 |
| Nikkei 225 | 1 hour | n/a | 1,448 | 37.15 | 30,376 USD | -19,330 |
| Dow Jones | Daily | n/a | 230 | 40.87 | 21,522 EUR | -10,642 |
| Nasdaq 100 | Daily | n/a | 157 | 36.94 | 19,558 EUR | -5,914 |
| Nasdaq 100 | 30 min | n/a | 2,879 | 37.76 | 15,967 EUR | -8,117 |
| Nasdaq 100 | 1 hour | n/a | 1,846 | 39.11 | 14,745 EUR | -4,515 |
| Nasdaq 100 | 15 min | n/a | 2,805 | 38.36 | 14,720 EUR | -6,136 |
| DAX 40 | 4 hours | n/a | 457 | 39.82 | 13,992 EUR | -6,277 |
| DAX 40 | Daily | n/a | 229 | 38.86 | 10,586 EUR | -7,248 |
| Nasdaq 100 | 4 hours | n/a | 491 | 37.88 | 10,070 EUR | -7,043 |
| GBP/USD | Daily | n/a | 207 | 40.10 | 8,822 USD | -7,282 |
| Brent Crude | 4 hours | n/a | 265 | 41.89 | 7,994 EUR | -6,045 |
| S&P 500 | Daily | n/a | 271 | 33.58 | 3,853 EUR | -1,367 |
| S&P 500 | 4 hours | n/a | 511 | 43.05 | 3,590 EUR | -1,205 |
| Gold | 30 min | n/a | 2,853 | 36.84 | 2,986 EUR | -1,100 |
| S&P 500 | 1 hour | n/a | 1,867 | 38.62 | 2,825 EUR | -1,122 |
| Gold | 1 hour | n/a | 1,797 | 36.95 | 2,413 EUR | -1,159 |
| S&P 500 | 30 min | n/a | 2,917 | 37.16 | 2,245 EUR | -1,368 |
Charts
Top 10 of 28 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Flux Polarity Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE inta = 0 ONCE intb = 0 src = TotalPrice dirup = 0
76 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 28 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 2.19 over 213 trades.
The best run had a maximum drawdown of 809 EUR at the tested position size, against a net result of 3,936 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.