Buys when two Supertrend lines are both bullish and the MACD histogram is positive, and sells short when both are bearish with a negative histogram. A long closes when either Supertrend turns bearish or the histogram turns negative, and a short mirrors this.
Best run of 6. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-11-USDJPY-4h-opt.tsv:63.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 4 hours |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 4 hours | n/a | 1,344 | 39.14 | 539,500 USD | -261,840 |
| USD/JPY | Daily | n/a | 564 | 37.06 | 1,687,640 USD | -611,420 |
| EUR/USD | Daily | n/a | 549 | 38.07 | 80,277 USD | -41,201 |
| GBP/USD | Daily | n/a | 559 | 40.79 | 13,606 USD | -5,220 |
| Gold | Daily | n/a | 542 | 38.01 | 1,427 EUR | -1,231 |
| Gold | 4 hours | n/a | 1,251 | 37.09 | 1,340 EUR | -970 |
Charts
The code
// ============================================================== // Dual Supertrend MACD Histogram // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE uba = 0 ONCE lba = 0 ONCE dira = 1 ONCE sta = 0 ONCE ubb = 0 ONCE lbb = 0 ONCE dirb = 1 ONCE stb = 0 myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = ExponentialAverage[9](myMacd) hist = myMacd - signal atra = AverageTrueRange[10](close) upa = MedianPrice + 3.0 * atra dna = MedianPrice - 3.0 * atra
105 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 by trade count was USD/JPY, 4 hours, with 1,344 trades.
The best run had a maximum drawdown of 261,840 USD at the tested position size, against a net result of 539,500 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.