Join waitlist
Strategies / Trend / Moving Average Colour Shift

Moving Average Colour Shift

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.

TrendLong onlySwingNikkei 2254 hours
1.62Profit factor
50,433Net profit USD
57.79%Win rate
533Trades
-9,435Max drawdown
94.62Avg trade

Best run of 13. Nikkei 225, 4 hours, spread 10, from run pf:2026-10-05-NIKKEI-4h.tsv:2.

Entry rules, long

  1. A bar is mixed when its close is above some but not all of the 15 period SMA, EMA and WMA.
  2. Enter long at market when flat.

Exit rules

  1. The long closes at market when a mixed bar follows a bar closing above all of them.

Test conditions

PeriodUp to 2026-10-05
InstrumentNikkei 225, 4 hours
Spread10 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best run4 hours1.62 53357.7950,433 USD-9,435
Nasdaq 1004 hours1.60 57159.8916,429 EUR-3,450
Dow JonesDailyn/a 29862.7524,816 EUR-8,824
Dow Jones4 hoursn/a 18364.4813,881 EUR-11,228
Nasdaq 1001 hourn/a 2,31949.3313,005 EUR-4,879
DAX 40Dailyn/a 30952.1012,571 EUR-5,640
Nasdaq 100Dailyn/a 19756.8511,872 EUR-4,488
US Crude OilDailyn/a 23557.879,568 EUR-5,340
DAX 404 hoursn/a 60260.135,919 EUR-5,803
S&P 500Dailyn/a 30557.383,350 EUR-944
FTSE 100Dailyn/a 23157.143,055 EUR-2,574
S&P 5004 hoursn/a 60255.982,068 EUR-1,096
GoldDailyn/a 27951.611,561 EUR-1,488

Charts

Results by run

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

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SMAEMAWMA
Longer historyRe-run on up to 1,000,000 barsNikkei 225 · 4 hours · older data 0.00 USD

Nikkei 225 had no history beyond the standard run, so both runs used 22,000 bars.

Nikkei 225 · 4 hours

Bars available22,000
Net, standard 200,000-bar run50,433.00 USD
Net, long run50,433.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Moving Average Colour Shift in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 9,435 USD at the tested position size, against a net result of 50,433 USD.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

MACD Trend Swing Stop

Also a trend strategy.

1.62 PF · 264 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs