Join waitlist
Strategies / Trend / Moving Average Trend Entry

Moving Average Trend Entry

Buys when close crosses above the 200-period SMA, or when it is above that average and crosses above the 20-period SMA, while flat. Closes the long when close crosses below the 20-period SMA, with a 5% stop below entry.

TrendLong onlyIntradayEUR/USD2 min
n/aProfit factor
198,595Net profit USD
17.66%Win rate
7,801Trades
-126,329Max drawdown
25.46Avg trade

Best run of 17. EUR/USD, 2 min, spread 1, from run sweeps:2026-10-10-EURUSD-2m-opt.tsv:5.

Entry rules, long

  1. Or the close is above the 200-period SMA and crosses above the 20-period SMA on this bar.
  2. Entries happen only when no position is open.

Exit rules

  1. A protective stop sits 5% below the entry price.

Test conditions

PeriodUp to 2026-10-10
InstrumentEUR/USD, 2 minutes
Spread1 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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run2 minn/a 7,80117.66198,595 USD-126,329
USD/JPYDailyn/a 45328.26705,600 USD-537,050
USD/JPY4 hoursn/a 1,30429.60353,970 USD-275,210
EUR/USD5 minn/a 7,60720.9784,403 USD-75,490
Nikkei 225Dailyn/a 45131.4922,606 USD-12,376
Silver4 hoursn/a 1,07528.4720,533 USD-19,005
Nikkei 2254 hoursn/a 1,06430.7317,853 USD-10,756
Dow Jones4 hoursn/a 43033.0216,093 EUR-4,074
Dow JonesDailyn/a 68334.7014,427 EUR-5,983
Nasdaq 100Dailyn/a 54632.9712,894 EUR-5,183
GBP/USDDailyn/a 47834.1011,879 USD-4,722
DAX 404 hoursn/a 1,22532.6510,679 EUR-3,373
Nasdaq 1004 hoursn/a 1,29831.439,309 EUR-4,278
DAX 40Dailyn/a 62832.806,078 EUR-5,489
Gold4 hoursn/a 1,10430.802,512 EUR-821
S&P 500Dailyn/a 71332.121,995 EUR-1,137
S&P 5004 hoursn/a 1,38432.881,494 EUR-969

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Moving Average Trend Entry
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 2 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

smalong = Average[200](close)
smashort = Average[20](close)

14 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
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 126,329 USD is large next to the net profit of 198,595 USD.

Questions

About this strategy

Can I run Moving Average Trend Entry 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 17 market and timeframe combinations. The best run by trade count was EUR/USD, 2 minutes, with 7,801 trades.

How large was the drawdown?

The best run had a maximum drawdown of 126,329 USD at the tested position size, against a net result of 198,595 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

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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