In an uptrend, defined as price above a rising 125-period SMA, it buys when the close dips below the 14-period SMA. In a downtrend it shorts when the close pops above the 4-period SMA. Longs exit on a close back above the 14 SMA and above the prior close, and shorts use the mirror rule.
Best run of 5. Nasdaq 100, Daily, spread 3, from run pf:2026-09-24-NAS100-D.tsv:4.
| Period | Up to 2026-09-25 |
| Instrument | Nasdaq 100, Daily |
| Spread | 3 points |
| Contracts | 1 |
| 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-09-25 |
| positionSize Contracts per trade | 1 |
| trendPeriod Trend SMA length | 125 |
| longPullbackPeriod SMA a long must dip below, and later close above to exit | 14 |
| shortPullbackPeriod SMA a short must pop above, and later close below to exit | 4 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | Daily | 1.47 | 849 | 63.49 | 15,121 EUR | -2,829 |
| USD/JPY | Daily | n/a | 1,279 | 68.26 | 534,800 JPY | -403,450 |
| EUR/USD | Daily | n/a | 1,255 | 67.89 | 67,985 USD | -29,275 |
| US Crude Oil | Daily | n/a | 1,060 | 64.91 | 8,939 EUR | -7,982 |
| GBP/USD | Daily | n/a | 1,278 | 66.98 | 5,422 USD | -3,476 |
Charts
The code
// ============================================================ // Trend Pullback Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade trendPeriod = 125 // trend SMA length longPullbackPeriod = 14 // SMA a long must dip below, and later close above to exit shortPullbackPeriod = 4 // SMA a short must pop above, and later close below to exit // --- Indicators --- trendMA = Average[trendPeriod](close) longPullbackMA = Average[longPullbackPeriod](close) shortPullbackMA = Average[shortPullbackPeriod](close)
26 more lines: the entry and exit rules.
Setup
Questions
Yes, it is fully rule-based. The rewritten code was not compile-checked, so run it in ProBacktest before going live.
USD/JPY, EUR/USD, GBP/USD and US Crude Oil daily were all positive. EUR/USD made USD 67,985 over 1,255 trades.
The Nasdaq 100 best run had a max drawdown of EUR 2,829.4. Scale to your own account based on that figure.
The 125-period trend filter needs a slow chart. All listed results are daily.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.