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.
Best run of 7. Nikkei 225, 4 hours, spread 10, from run pf:2026-10-05-NIKKEI-4h.tsv:8.
| Period | Up to 2026-10-05 |
| Instrument | Nikkei 225, 4 hours |
| Spread | 10 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nikkei 225Best run | 4 hours | 1.22 | 798 | 37.72 | 29,850 USD | -5,077 |
| EUR/USD | Daily | n/a | 472 | 36.86 | 52,025 USD | -42,697 |
| EUR/USD | 1 hour | n/a | 3,844 | 40.17 | 29,475 USD | -28,920 |
| Dow Jones | Daily | n/a | 686 | 21.28 | 6,864 EUR | -5,220 |
| GBP/USD | Daily | n/a | 487 | 35.11 | 5,256 USD | -4,977 |
| S&P 500 | 4 hours | n/a | 1,098 | 36.61 | 2,144 EUR | -980 |
| Gold | 1 hour | n/a | 2,815 | 38.12 | 1,124 EUR | -1,065 |
Charts
The code
// ============================================================== // 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
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 7 market and timeframe combinations. The best run was Nikkei 225, 4 hours, with a profit factor of 1.22 over 798 trades.
The best run had a maximum drawdown of 5,077 USD at the tested position size, against a net result of 29,850 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.