Join waitlist
Strategies / Trend / Three MA Trend

Three MA Trend Strategy

Three simple moving averages of 50, 99 and 297 bars set the direction. When they line up in rising order the system goes long, and in falling order it goes short. It stays in the trade while the averages are mixed and only flips on the opposite alignment.

TrendLong & shortIntradayGold5 min
1.43Profit factor
3,616Net profit EUR
37.59%Win rate
689Trades
-640Max drawdown
5.25Avg trade

Best run of 21. Gold, 5 min, spread 0.6, from run pf:2026-09-24-GOLD-5m.tsv:2.

Entry rules, long

Entry rules, short

Exit rules

  1. No stop loss, target or other exit

Test conditions

PeriodUp to 2026-09-24
InstrumentGold, 5 minutes
Spread0.6 points
Contracts1
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-09-24
Parameters (4)
positionSize
Contracts per trade
1
fastPeriod
Fast simple moving average
50
midPeriod
Middle simple moving average
99
slowPeriod
Slow simple moving average
297

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run5 min1.43 68937.593,616 EUR-640
USD/JPYDailyn/a 4346.511,829,610 JPY-551,800
USD/JPY1 hourn/a 48935.17420,600 JPY-389,150
USD/JPY5 minn/a 69738.02409,720 JPY-164,650
USD/JPY2 minn/a 69434.44177,140 JPY-94,930
EUR/USDDailyn/a 3740.54112,364 USD-50,301
Dow JonesDailyn/a 3650.0026,091 EUR-13,759
Silver5 minn/a 70935.5425,631 USD-24,086
Nasdaq 100Dailyn/a 2846.4321,362 EUR-5,520
Dow Jones3 minn/a 70038.1414,247 EUR-7,026
GBP/USDDailyn/a 4942.8612,343 USD-9,278
US Crude Oil4 hoursn/a 8237.808,985 EUR-5,330
Brent Crude4 hoursn/a 5438.898,828 EUR-8,258
S&P 500Dailyn/a 3256.254,280 EUR-1,615
GoldDailyn/a 3647.223,866 EUR-1,685
Gold3 minn/a 68534.452,871 EUR-803
Gold10 minn/a 70536.032,165 EUR-1,049
Gold4 hoursn/a 10138.612,105 EUR-1,588
Gold30 minn/a 68436.841,971 EUR-1,355
Gold1 hourn/a 43335.331,514 EUR-1,059
Gold2 minn/a 70436.51967 EUR-784

Charts

Results by run

Top 10 of 21 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder, rewritten to house standard

// ============================================================
// Three MA Trend
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 5 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
fastPeriod = 50           // fast simple moving average
midPeriod = 99            // middle simple moving average
slowPeriod = 297          // slow simple moving average

// --- Indicators ---
fastMA = Average[fastPeriod](close)
midMA = Average[midPeriod](close)
slowMA = Average[slowPeriod](close)

15 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

SMA
Longer historyRe-run on up to 1,000,000 barsGold · 5 min · older data -238.60 EUR

With 1,000,000 bars on Gold 5 minutes the profit was EUR 3,377.30 versus EUR 3,615.90 in the standard run, so the older data alone gave back EUR 238.60.

Gold · 5 min

Bars available1,000,000
Net, standard 200,000-bar run3,615.90 EUR
Net, long run3,377.30 EUR
Net on the older data alone-238.60 EUR
Read this firstKnown weaknesses4 points
  • There is no stop loss, target or exit other than a full reversal, so a trade can give back a lot before the averages realign.
  • The win rate on Gold 5 minutes is 37.59%, which is normal for trend following but means long losing runs.
  • USD/JPY runs show drawdowns close to profit, such as JPY 389,150.00 against JPY 420,600.00 on 1 hour.
  • The longer Gold 5 minute history came to EUR -238.60 in the older part, so the edge did not hold on all past data.

Questions

About this strategy

Is it suitable for ProOrder?

Yes. It needs only three averages and trades 1 contract per signal.

Which markets were tested?

Gold 5 minutes gave profit factor 1.43 and EUR 3,615.90 over 689 trades. All twenty runs across forex, indices, metals and oil ended positive.

What drawdown should I expect?

At 1 contract on Gold 5 minutes, max drawdown was EUR 640.20.

Why 5 minute bars for a trend system?

Long averages on short bars catch intraday trends while still trading often enough, at 689 trades on Gold.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Triple Band Market Model

Best run on the same market, Gold.

2.27 PF · 203 trades

IBS Trend Pullback

A similar profit factor.

1.42 PF · 610 trades

Trend systems pair well with the right mean reversion. 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