This idea trades a bullish or bearish outside bar when the 20-bar simple moving average is rising or falling. Positions close when a volatility measure or the 14-bar RSI of the typical price moves to an extreme.
Best run of 5. EUR/USD, 3 min, spread 1, from run sweeps:2026-10-11-EURUSD-3m-opt.tsv:25.
| Period | Up to 2026-10-11 |
| Instrument | EUR/USD, 3 minutes |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 3 min | n/a | 5,144 | 36.06 | 78,772 USD | -55,042 |
| USD/JPY | Daily | n/a | 362 | 54.14 | 182,390 USD | -135,520 |
| EUR/USD | Daily | n/a | 425 | 55.76 | 40,157 USD | -20,980 |
| Gold | Daily | n/a | 537 | 51.40 | 985 EUR | -325 |
| Gold | 4 hours | n/a | 1,091 | 50.96 | 795 EUR | -535 |
Charts
The code
// ============================================================== // Outside Bar Slope Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 3 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE temp = 0 ONCE switch = 0 ma = Average[20](close)
41 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 5 market and timeframe combinations. The best run by trade count was EUR/USD, 3 minutes, with 5,144 trades.
The best run had a maximum drawdown of 55,042 USD at the tested position size, against a net result of 78,772 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.