Buys when a Supertrend band confirms an uptrend, money flow is rising, and a filtered rate of change is beyond ±3. Sells short on the mirror setup, and every entry has a fixed 2% stop.
Best run of 11. Gold, 1 hour, spread 0.6, from run sweeps:2026-10-11-GOLD-1h-opt.tsv:16.
| Period | Up to 2026-10-11 |
| Instrument | Gold, 1 hour |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 1 hour | n/a | 170 | 21.76 | 1,387 EUR | -1,002 |
| USD/JPY | Daily | n/a | 56 | 37.50 | 599,950 USD | -299,880 |
| EUR/USD | 5 min | n/a | 2 | 100.00 | 56,227 USD | -27,877 |
| EUR/USD | 30 min | n/a | 3 | 66.67 | 54,024 USD | -27,782 |
| EUR/USD | 3 min | n/a | 1 | 100.00 | 30,777 USD | -27,897 |
| EUR/USD | 2 min | n/a | 2 | 50.00 | 29,992 USD | -28,457 |
| Nasdaq 100 | 30 min | n/a | 101 | 22.77 | 9,384 EUR | -4,828 |
| US Crude Oil | 5 min | n/a | 77 | 27.27 | 7,923 EUR | -4,005 |
| S&P 500 | Daily | n/a | 108 | 27.78 | 2,147 EUR | -1,954 |
| S&P 500 | 15 min | n/a | 37 | 35.14 | 1,401 EUR | -1,170 |
| Gold | 30 min | n/a | 59 | 23.73 | 839 EUR | -720 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // Supertrend Money Flow ROC // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false ONCE tup = 0 ONCE tdown = 0 ONCE trend = 1 ONCE mf = 50 ONCE mfok = 0 myAtr = AverageTrueRange[5](close) upband = MedianPrice - 2 * myAtr dnband = MedianPrice + 2 * myAtr tupprev = tup tdprev = tdown
64 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 11 market and timeframe combinations. The best run by trade count was Gold, 1 hour, with 170 trades.
The best run had a maximum drawdown of 1,002 EUR at the tested position size, against a net result of 1,387 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.