Buys when a mixed bar, closing above some but not all of the 15 period SMA, EMA and WMA, follows a bar closing below all of them. Sells the long when a mixed bar follows a bar closing above all of them.
Best run of 13. Nikkei 225, 4 hours, spread 10, from run pf:2026-10-05-NIKKEI-4h.tsv:2.
| Period | Up to 2026-10-05 |
| Instrument | Nikkei 225, 4 hours |
| Spread | 10 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nikkei 225Best run | 4 hours | 1.62 | 533 | 57.79 | 50,433 USD | -9,435 |
| Nasdaq 100 | 4 hours | 1.60 | 571 | 59.89 | 16,429 EUR | -3,450 |
| Dow Jones | Daily | n/a | 298 | 62.75 | 24,816 EUR | -8,824 |
| Dow Jones | 4 hours | n/a | 183 | 64.48 | 13,881 EUR | -11,228 |
| Nasdaq 100 | 1 hour | n/a | 2,319 | 49.33 | 13,005 EUR | -4,879 |
| DAX 40 | Daily | n/a | 309 | 52.10 | 12,571 EUR | -5,640 |
| Nasdaq 100 | Daily | n/a | 197 | 56.85 | 11,872 EUR | -4,488 |
| US Crude Oil | Daily | n/a | 235 | 57.87 | 9,568 EUR | -5,340 |
| DAX 40 | 4 hours | n/a | 602 | 60.13 | 5,919 EUR | -5,803 |
| S&P 500 | Daily | n/a | 305 | 57.38 | 3,350 EUR | -944 |
| FTSE 100 | Daily | n/a | 231 | 57.14 | 3,055 EUR | -2,574 |
| S&P 500 | 4 hours | n/a | 602 | 55.98 | 2,068 EUR | -1,096 |
| Gold | Daily | n/a | 279 | 51.61 | 1,561 EUR | -1,488 |
Charts
Top 10 of 13 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Moving Average Colour Shift // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false sma = Average[15](close) ema = ExponentialAverage[15](close) wma = WeightedAverage[15](close) count = 0
29 more lines: the entry and exit rules.
Setup
Nikkei 225 had no history beyond the standard run, so both runs used 22,000 bars.
| Bars available | 22,000 |
| Net, standard 200,000-bar run | 50,433.00 USD |
| Net, long run | 50,433.00 USD |
| Net on the older data alone | 0.00 USD |
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 13 market and timeframe combinations. The best run was Nikkei 225, 4 hours, with a profit factor of 1.62 over 533 trades.
The best run had a maximum drawdown of 9,435 USD at the tested position size, against a net result of 50,433 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.