Join waitlist
Strategies / Trend / Dual Supertrend MACD Histogram

Dual Supertrend MACD Histogram

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.

TrendLong & shortSwingUSD/JPY4 hours
n/aProfit factor
539,500Net profit USD
39.14%Win rate
1,344Trades
-261,840Max drawdown
401Avg trade

Best run of 6. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-11-USDJPY-4h-opt.tsv:63.

Entry rules, long

  1. The first Supertrend (ATR 10, multiplier 3.0) is in an uptrend.
  2. The second Supertrend (ATR 20, multiplier 5.0) is in an uptrend.
  3. Signals are only considered after bar 40.

Entry rules, short

  1. The first Supertrend (ATR 10, multiplier 3.0) is in a downtrend.
  2. The second Supertrend (ATR 20, multiplier 5.0) is in a downtrend.
  3. Signals are only considered after bar 40.

Exit rules

  1. A short closes when either Supertrend turns bullish or the histogram turns positive.
  2. An opposite entry signal reverses an open position.
  3. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-11
InstrumentUSD/JPY, 4 hours
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run4 hoursn/a 1,34439.14539,500 USD-261,840
USD/JPYDailyn/a 56437.061,687,640 USD-611,420
EUR/USDDailyn/a 54938.0780,277 USD-41,201
GBP/USDDailyn/a 55940.7913,606 USD-5,220
GoldDailyn/a 54238.011,427 EUR-1,231
Gold4 hoursn/a 1,25137.091,340 EUR-970

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

ATREMAMACDSuperTrend
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Dual Supertrend MACD Histogram in ProOrder?

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.

Which markets was it tested on?

It was tested on 6 market and timeframe combinations. The best run by trade count was USD/JPY, 4 hours, with 1,344 trades.

How large was the drawdown?

The best run had a maximum drawdown of 261,840 USD at the tested position size, against a net result of 539,500 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs