Trades in the direction of two Hull moving averages, confirmed by a MACD filter and a True Strength Index signal line. It buys when the trend turns up, sells short when it turns down, and closes when the trend fades.
Best run of 6. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:14.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.29 | 1,134 | 38.89 | 2,705,510 USD | -478,130 |
| USD/JPY | 4 hours | n/a | 3,077 | 39.39 | 868,220 USD | -239,430 |
| EUR/USD | Daily | n/a | 1,090 | 39.91 | 95,182 USD | -66,873 |
| GBP/USD | Daily | n/a | 1,193 | 39.98 | 14,331 USD | -8,876 |
| Brent Crude | Daily | n/a | 452 | 40.27 | 10,312 EUR | -9,087 |
| Gold | 4 hours | n/a | 2,738 | 38.13 | 1,642 EUR | -1,027 |
Charts
The code
// ============================================================== // Hull MA Cross With MACD Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false diffa = 2 * WeightedAverage[4](close) - WeightedAverage[7](close) na = WeightedAverage[3](diffa) nb = na[2] diffb = 2 * WeightedAverage[7](close) - WeightedAverage[14](close) nc = WeightedAverage[4](diffb) nd = nc[2] myMacd = ExponentialAverage[7](close) - ExponentialAverage[14](close) amacd = ExponentialAverage[3](myMacd) pc = close - close[1] apc = abs(close - close[1]) dspc = ExponentialAverage[3](ExponentialAverage[5](pc)) dsapc = ExponentialAverage[3](ExponentialAverage[5](apc))
28 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 6 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.29 over 1,134 trades.
The best run had a maximum drawdown of 478,130 USD at the tested position size, against a net result of 2,705,510 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.