The strategy buys when the close crosses the 100-period or 600-period EMA while above the 25-period EMA, MACD is above zero and RSI(14) is above 50. It sells short on the mirror setup and closes positions when a false or done signal appears.
Best run of 3. FTSE 100, 4 hours, spread 2, from run sweeps:2026-10-11-FTSE100-4h-opt.tsv:35.
| Period | Up to 2026-10-11 |
| Instrument | FTSE 100, 4 hours |
| Spread | 2 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 |
|---|---|---|---|---|---|---|
| FTSE 100Best run | 4 hours | n/a | 424 | 52.59 | 1,414 EUR | -1,346 |
| US Crude Oil | Daily | n/a | 157 | 59.87 | 5,353 EUR | -4,493 |
| Dow Jones | 4 hours | n/a | 131 | 57.25 | 4,802 EUR | -4,429 |
Charts
The code
// ============================================================== // EMA MACD RSI State Machine // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE arr = 0 ONCE myNext = 0 ea = ExponentialAverage[25](close) eb = ExponentialAverage[100](close) ec = ExponentialAverage[600](close) myMacd = MACDline[12,26,9](close) myRsi = RSI[14](close)
108 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 3 market and timeframe combinations. The best run by trade count was FTSE 100, 4 hours, with 424 trades.
The best run had a maximum drawdown of 1,346 EUR at the tested position size, against a net result of 1,414 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.