The strategy buys when the close crosses from below to at or above its 21-bar average while moving averages are stacked upward. It sells short on the mirror setup, with a stop at the 90-bar SMA and a target 1.5 times that distance.
Best run of 4. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:72.
| Period | Up to 2026-10-12 |
| Instrument | Nasdaq 100, 4 hours |
| Spread | 3 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | 4 hours | n/a | 403 | 39.95 | 7,086 EUR | -5,562 |
| Nikkei 225 | Daily | n/a | 140 | 42.14 | 26,356 USD | -13,529 |
| Nasdaq 100 | Daily | n/a | 151 | 39.07 | 11,287 EUR | -5,903 |
| US Crude Oil | 4 hours | n/a | 289 | 41.87 | 8,371 EUR | -4,304 |
Charts
The code
// ============================================================== // Stacked Moving Average Turn // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false
28 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 4 market and timeframe combinations. The best run by trade count was Nasdaq 100, 4 hours, with 403 trades.
The best run had a maximum drawdown of 5,562 EUR at the tested position size, against a net result of 7,086 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.