Join waitlist
Strategies / Trend / Hull MA Cross With MACD Filter

Hull MA Cross With MACD Filter

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.

TrendLong & shortSwingUSD/JPYDaily
1.29Profit factor
2,705,510Net profit USD
38.89%Win rate
1,134Trades
-478,130Max drawdown
2,386Avg trade

Best run of 6. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:14.

Entry rules, long

  1. The second Hull moving average (14 periods) is above its value two bars earlier.
  2. The close is above the first Hull moving average.
  3. The MACD line (7 and 14 periods) is above its 3-period EMA signal line.
  4. The double-smoothed True Strength Index signal line (5, 3 and 2 periods) is above -4.
  5. No position is open.

Entry rules, short

  1. The second Hull moving average (14 periods) is below its value two bars earlier.
  2. The close is below the first Hull moving average.
  3. The MACD line (7 and 14 periods) is below its 3-period EMA signal line.
  4. The double-smoothed True Strength Index signal line (5, 3 and 2 periods) is below 4.
  5. No position is open.

Exit rules

  1. A short closes when both Hull lines rise relative to two bars earlier and the close is above the first Hull.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, Daily
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.29 1,13438.892,705,510 USD-478,130
USD/JPY4 hoursn/a 3,07739.39868,220 USD-239,430
EUR/USDDailyn/a 1,09039.9195,182 USD-66,873
GBP/USDDailyn/a 1,19339.9814,331 USD-8,876
Brent CrudeDailyn/a 45240.2710,312 EUR-9,087
Gold4 hoursn/a 2,73838.131,642 EUR-1,027

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

Hull MAMACDEMAWMA
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Hull MA Cross With MACD Filter 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 was USD/JPY, Daily, with a profit factor of 1.29 over 1,134 trades.

How large was the drawdown?

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.

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

Supertrend EMA Trend Filter

Also a trend strategy.

1.29 PF · 1,077 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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