Join waitlist
Strategies / Trend / EMA Crossover With Trend Filter (long and short)

EMA Crossover With Trend Filter (long and short)

The idea buys when the 7-period EMA crosses above the 50-period EMA while the 200-period SMA is not falling, and sells short on the mirror-image cross while it is falling. Trades use a 0.5 percent stop and 1.5 percent target.

TrendLong & shortSwingDow JonesDaily
1.52Profit factor
4,090Net profit EUR
25.34%Win rate
221Trades
-719Max drawdown
18.51Avg trade

Best run of 18. Dow Jones, Daily, spread 3, from run pf:2026-10-05-DOW30-D.tsv:13.

Entry rules, long

  1. Buys 1 contract at market with a 0.5 percent stop and 1.5 percent target, when no long is open

Entry rules, short

  1. Sells 1 contract short at market with a 0.5 percent stop and 1.5 percent target, when no short is open

Exit rules

  1. The 0.5 percent stop or 1.5 percent target closes the trade

Test conditions

PeriodUp to 2026-10-05
InstrumentDow Jones, Daily
Spread3 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
Dow JonesBest runDaily1.52 22125.344,090 EUR-719
USD/JPY1 hourn/a 1,32927.92526,710 USD-308,900
EUR/USD2 minn/a 1,18129.1374,340 USD-24,351
EUR/USD3 minn/a 1,11929.6728,143 USD-11,025
EUR/USD4 hoursn/a 60626.7326,381 USD-20,488
EUR/USD5 minn/a 1,11330.3720,436 USD-11,933
Nikkei 2253 minn/a 1,28728.8312,165 USD-10,355
Nasdaq 1001 hourn/a 1,62222.753,997 EUR-3,695
Nasdaq 1004 hoursn/a 47725.163,190 EUR-1,073
Dow Jones4 hoursn/a 16127.332,893 EUR-2,613
US Crude Oil1 hourn/a 1,30525.981,734 EUR-1,713
Gold5 minn/a 1,38128.821,653 EUR-618
FTSE 100Dailyn/a 21032.861,358 EUR-708
DAX 40Dailyn/a 21622.691,357 EUR-571
Gold2 minn/a 1,25629.941,032 EUR-817
Gold3 minn/a 1,30930.481,002 EUR-683
S&P 5001 hourn/a 1,42225.81888 EUR-782
S&P 5004 hoursn/a 47226.27732 EUR-491

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Crossover With Trend Filter (long and short)
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

smatrend = Average[200](close)

19 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

EMASMA
Longer historyRe-run on up to 1,000,000 barsDow Jones · Daily · older data 0.00 EUR

Dow Jones had no history beyond the standard run, so both runs used 14,000 bars.

Dow Jones · Daily

Bars available14,000
Net, standard 200,000-bar run4,089.70 EUR
Net, long run4,089.70 EUR
Net on the older data alone0.00 EUR
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 EMA Crossover With Trend Filter (long and short) 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 18 market and timeframe combinations. The best run was Dow Jones, Daily, with a profit factor of 1.52 over 221 trades.

How large was the drawdown?

The best run had a maximum drawdown of 719 EUR at the tested position size, against a net result of 4,090 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Turtle Trade

Best run on the same market, Dow Jones.

2.42 PF · 6,324 trades

EMA Filtered Oscillator Long

Also a trend strategy.

1.52 PF · 275 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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