Join today
Strategies / Trend / EMA Cross 50/200

EMA Cross 50/200 on Intraday Charts

A classic crossover: buy when the 50 EMA crosses above the 200 EMA, short when it crosses below. The trade closes when the averages flip back or a 1% stop is hit.

TrendLong & shortIntradayGold30 min
1.39Profit factor
2,578Net profit EUR
26.11%Win rate
697Trades
-862Max drawdown
3.70Avg trade

Best run of 17. Gold, 30 min, spread 0.6, from run pf:2026-09-15-GOLD-30m.tsv:2.

Entry rules, long

  1. Members only
  2. No position is open

Entry rules, short

  1. Members only
  2. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when the 50 EMA is back above the 200 EMA

Test conditions

PeriodUp to 2026-09-15
InstrumentGold, 30 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-15

Parameters

positionSize
Contracts per trade
1
fastPeriod
Fast EMA length
50
slowPeriod
Slow EMA length
200
stopLossPct
Protective stop as percent of entry price
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run30 min1.39 69726.112,578 EUR-862
Nasdaq 10015 minn/a 68029.854,705 EUR-8,595
Nasdaq 10030 minn/a 78525.354,060 EUR-5,226
DAX 4015 minn/a 69025.652,889 EUR-6,063
S&P 5002 hoursn/a 26123.372,269 EUR-1,766
Gold5 minn/a 59528.40901 EUR-986
Gold1 hourn/a 48424.38807 EUR-1,321
S&P 50030 minn/a 71427.31644 EUR-1,718
Gold15 minn/a 68526.13514 EUR-1,644
S&P 5001 hourn/a 50224.10480 EUR-1,540
DAX 405 minn/a 57630.21-283 EUR-5,098
S&P 5005 minn/a 58226.12-816 EUR-1,629
S&P 50015 minn/a 64327.99-990 EUR-2,070
DAX 4030 minn/a 80523.85-1,817 EUR-8,593
Nasdaq 1001 hourn/a 55621.58-2,509 EUR-8,933
Nasdaq 1005 minn/a 62725.52-5,043 EUR-7,459
DAX 401 hourn/a 54321.73-6,357 EUR-8,613

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-10K-5K3K5KNasdaq 100 · 15 minNasdaq 100 · 30 minDAX 40 · 15 minGold · 30 minS&P 500 · 2 hoursGold · 5 minGold · 1 hourS&P 500 · 30 minGold · 15 minS&P 500 · 1 hourDAX 40 · 5 minS&P 500 · 5 minS&P 500 · 15 minDAX 40 · 30 minNasdaq 100 · 1 hourNasdaq 100 · 5 min

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// EMA Cross 50/200
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 30 minutes
// ============================================================

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

// --- Parameters ---
positionSize = 1       // contracts per trade
fastPeriod = 50        // fast EMA length
slowPeriod = 200       // slow EMA length
stopLossPct = 1        // protective stop, percent of entry price

// --- Indicators ---
fastMA = ExponentialAverage[fastPeriod](close)
slowMA = ExponentialAverage[slowPeriod](close)

26 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Only 9 runs were profitable and the rest lost. DAX 40 1 hour ended at EUR -6,357.00 and Nasdaq 100 5 minutes at EUR -5,043.20.
  • The win rate on the best run was 26.11%, so most trades are small losses waiting for a trend.
  • The best run made EUR 2,578.10, a thin edge that commissions and financing (not included) could eat into.
  • Profit factor is only recorded for the Gold 30 minute run. The other markets come from sweep data.

Indicators used

EMA

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Does it run in ProOrder?

Yes, it trades 1 contract per signal with a 1% stop and reverses exposure only through a new crossover after the exit.

Which markets suit it best?

Gold 30 minutes had a profit factor of 1.39. Nasdaq 100 15 minutes made EUR 4,704.70 but with a EUR 8,594.70 drawdown, and DAX 40 was mostly negative.

What drawdown came with the Gold run?

The maximum drawdown was EUR 862.20 at 1 contract, against EUR 2,578.10 net profit.

Why 30 minute bars?

On a 30 minute chart the 200 EMA spans several days, so crosses mark multi day swings without holding overnight for months.

Related

Strategies like this one

Monday Dip Buy

Uses the same indicator.

n/a PF · 146 trades

Triple Band Market Model

Best run on the same market, Gold.

2.27 PF · 203 trades

Dual MA Long Trend

A similar profit factor.

1.39 PF · 241 trades

Want to follow systems that go beyond a basic crossover? 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