Buys when a MACD-based line crosses above a small negative threshold or RSI(4) crosses above 30, with smoothed stochastic RSI below 57. Sells short when that line crosses below 0, or when the price-to-average gap crosses below its threshold with stochastic RSI above 57.
Best run of 1. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:14.
| 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 | 2,886 | 45.67 | 12,125 EUR | -8,198 |
Charts
The code
// ============================================================== // MACD And Stochastic RSI Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE stk = 50 myMacd = ExponentialAverage[11](close) - ExponentialAverage[18](close) amacd = ExponentialAverage[6](myMacd) delta = myMacd - amacd rs = RSI[4](close) rhh = highest[8](rs) rll = lowest[8](rs)
24 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 one combination, Nasdaq 100, 4 hours, with 2,886 trades.
The best run had a maximum drawdown of 8,198 EUR at the tested position size, against a net result of 12,125 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.