Buys one contract after the close drops below the previous bar's 5-bar average of lows while staying above its 200-bar average. Exits when the close rises above the previous bar's 5-bar average of highs, or at a 5 percent stop loss.
Best run of 9. S&P 500, Daily, spread 1, from run pf:2026-10-12-USA500-D.tsv:10.
| Period | Up to 2026-10-12 |
| Instrument | S&P 500, Daily |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | 1.83 | 682 | 69.79 | 4,437 EUR | -477 |
| Nasdaq 100 | Daily | 1.60 | 619 | 65.75 | 16,146 EUR | -2,574 |
| EUR/USD | Daily | n/a | 373 | 64.34 | 43,277 USD | -37,114 |
| Nikkei 225 | Daily | n/a | 499 | 69.34 | 20,474 USD | -13,013 |
| Dow Jones | Daily | n/a | 649 | 70.42 | 19,082 EUR | -4,802 |
| Dow Jones | 4 hours | n/a | 412 | 68.45 | 9,258 EUR | -4,057 |
| Nasdaq 100 | 4 hours | n/a | 1,235 | 69.47 | 4,733 EUR | -3,634 |
| S&P 500 | 4 hours | n/a | 1,275 | 68.71 | 1,555 EUR | -825 |
| Gold | Daily | n/a | 524 | 61.64 | 1,073 EUR | -521 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Moving Average Channel Dip Buy // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false smalow = Average[5](low) smahigh = Average[5](high) filter = Average[200](close)
11 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 9 market and timeframe combinations. The best run was S&P 500, Daily, with a profit factor of 1.83 over 682 trades.
The best run had a maximum drawdown of 476 EUR at the tested position size, against a net result of 4,437 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.