Join waitlist
Strategies / Trend / Fast EMA Crossover With Stop

Fast EMA Crossover With Stop

This idea buys when a 5-period EMA crosses above a 13-period EMA and sells short on the opposite cross. Each trade has a stop 1% from the signal bar close, and each opposite cross reverses the position.

TrendLong & shortSwingUSD/JPYDaily
12.33Profit factor
1,518,750Net profit USD
1.88%Win rate
1,009Trades
-119,470Max drawdown
1,505Avg trade

Best run of 3. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:7.

Entry rules, long

  1. The 5-period EMA crosses above the 13-period EMA.

Entry rules, short

  1. The 5-period EMA crosses below the 13-period EMA.

Exit rules

  1. A stop 1% of the signal bar's close from the entry price protects each trade.
  2. No target is coded.

Test conditions

PeriodUp to 2026-10-04
InstrumentUSD/JPY, Daily
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily12.33 1,0091.881,518,750 USD-119,470
Brent CrudeDailyn/a 38614.2521,466 EUR-9,663
Gold4 hoursn/a 2,35128.331,927 EUR-1,493

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Fast EMA Crossover With Stop
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE ready = 0

fast = ExponentialAverage[5](close)
slow = ExponentialAverage[13](close)
stopdist = close * 0.01

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

EMA
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run1,518,750.00 USD
Net, long run1,518,750.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Fast EMA Crossover With Stop 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 3 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 12.33 over 1,009 trades.

How large was the drawdown?

The best run had a maximum drawdown of 119,470 USD at the tested position size, against a net result of 1,518,750 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Long-Term Moving Average Cross

Also a trend strategy.

12.31 PF · 61 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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