The strategy buys when a linear regression momentum line crosses above zero while a money flow reading is positive, and sells short on the mirror cross. Each trade has a stop and target set at 50 percent from the entry price.
Best run of 9. Gold, 15 min, spread 0.6, from run sweeps:2026-10-07-GOLD-15m-opt.tsv:21.
| Period | Up to 2026-10-07 |
| Instrument | Gold, 15 minutes |
| 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 15 min | n/a | 2,231 | 34.20 | 1,071 EUR | -1,055 |
| USD/JPY | 1 hour | n/a | 1,408 | 38.21 | 1,066,280 USD | -350,250 |
| Nikkei 225 | 2 min | n/a | 2,061 | 38.23 | 19,703 USD | -9,558 |
| DAX 40 | 1 hour | n/a | 648 | 39.51 | 11,967 EUR | -6,097 |
| DAX 40 | Daily | n/a | 40 | 40.00 | 5,554 EUR | -5,384 |
| DAX 40 | 5 min | n/a | 2,154 | 36.77 | 5,076 EUR | -3,747 |
| Gold | Daily | n/a | 52 | 48.08 | 3,053 EUR | -982 |
| Gold | 10 min | n/a | 2,230 | 33.54 | 1,814 EUR | -1,236 |
| Gold | 4 hours | n/a | 332 | 39.46 | 1,483 EUR | -1,140 |
Charts
The code
// ============================================================== // Linear Regression Money Flow Momentum // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 15 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE mfi = 0 ONCE mfok = 0 donmid = (highest[20](high) + lowest[20](low)) / 2 base = (donmid + Average[20](close)) / 2 bluewave = LinearRegression[20](close - base) chg = TypicalPrice - TypicalPrice[1]
36 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 by trade count was Gold, 15 minutes, with 2,231 trades.
The best run had a maximum drawdown of 1,055 EUR at the tested position size, against a net result of 1,071 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.