Join waitlist
Strategies / Mean reversion / MACD Cross Fade With VWMA

MACD Cross Fade With VWMA

This idea takes trades against a MACD line and signal cross when price touches its 20-period volume-weighted average. Each trade has a stop based on 2 times the 7-period ATR, capped at 1.3%, and a target at 3 times ATR.

Mean reversionLong & shortSwingNikkei 2254 hours
1.22Profit factor
29,850Net profit USD
37.72%Win rate
798Trades
-5,077Max drawdown
37.41Avg trade

Best run of 7. Nikkei 225, 4 hours, spread 10, from run pf:2026-10-05-NIKKEI-4h.tsv:8.

Entry rules, long

  1. The low is at or below the 20-period volume-weighted moving average.
  2. ADX(7) is above 20, Choppiness(7) is below 100, and at least 7 bars have passed since the last exit.

Entry rules, short

  1. The high is at or above the 20-period volume-weighted moving average.
  2. ADX(7) is above 20, Choppiness(7) is below 100, and at least 7 bars have passed since the last exit.

Exit rules

  1. The target is 3 times the 7-period ATR as a percentage of price, measured from the fill price.
  2. No other exit is coded.

Test conditions

PeriodUp to 2026-10-05
InstrumentNikkei 225, 4 hours
Spread10 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-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best run4 hours1.22 79837.7229,850 USD-5,077
EUR/USDDailyn/a 47236.8652,025 USD-42,697
EUR/USD1 hourn/a 3,84440.1729,475 USD-28,920
Dow JonesDailyn/a 68621.286,864 EUR-5,220
GBP/USDDailyn/a 48735.115,256 USD-4,977
S&P 5004 hoursn/a 1,09836.612,144 EUR-980
Gold1 hourn/a 2,81538.121,124 EUR-1,065

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Cross Fade With VWMA
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lastexit = -1000
ONCE wason = 0

IF NOT OnMarket AND wason = 1 THEN
    lastexit = BarIndex
ENDIF

47 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

ADXATRMACDEMAVolume
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run MACD Cross Fade With VWMA 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 7 market and timeframe combinations. The best run was Nikkei 225, 4 hours, with a profit factor of 1.22 over 798 trades.

How large was the drawdown?

The best run had a maximum drawdown of 5,077 USD at the tested position size, against a net result of 29,850 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

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

Capitulation Fade Reversal

Also a mean reversion strategy.

1.23 PF · 1,969 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