Join waitlist
Strategies / Trend / EMA Trend State Filter

EMA Trend State Filter

The strategy holds one long contract while EMA(12) is above EMA(26) and the EMA(2) of the average price differs from EMA(12). It closes the long when that state ends.

TrendLong onlySwingNasdaq 100Daily
2.46Profit factor
21,117Net profit EUR
43.32%Win rate
187Trades
-3,422Max drawdown
113Avg trade

Best run of 24. Nasdaq 100, Daily, spread 3, from run pf:2026-10-12-NAS100-D.tsv:12.

Entry rules, long

Exit rules

  1. The long closes when EMA(12) is not above EMA(26), or when the EMA(2) of OHLC4 equals EMA(12).

Test conditions

PeriodUp to 2026-10-12
InstrumentNasdaq 100, 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.46 18743.3221,117 EUR-3,422
GoldDaily2.30 24131.543,740 EUR-809
S&P 500Daily1.98 26035.384,113 EUR-735
Dow JonesDaily1.93 25536.0828,389 EUR-6,165
DAX 40Daily1.63 24037.9214,859 EUR-3,429
USD/JPY30 min1.14 3,34330.24696,410 USD-171,200
USD/JPYDailyn/a 21836.701,249,310 USD-485,700
USD/JPY1 hourn/a 2,34231.21635,650 USD-217,260
USD/JPY10 minn/a 3,53229.13187,470 USD-154,010
EUR/USDDailyn/a 20336.4591,356 USD-47,880
Nikkei 225Dailyn/a 19634.1836,532 USD-13,365
Nikkei 2254 hoursn/a 46732.9821,121 USD-15,009
Dow Jones4 hoursn/a 18236.2613,500 EUR-4,750
US Crude OilDailyn/a 19538.4611,018 EUR-7,512
Nasdaq 10030 minn/a 3,37432.2810,740 EUR-3,615
Nasdaq 1001 hourn/a 2,01332.1410,495 EUR-3,846
Nasdaq 1004 hoursn/a 57335.789,503 EUR-5,336
DAX 4030 minn/a 3,42230.198,970 EUR-4,179
DAX 401 hourn/a 1,92131.867,678 EUR-4,219
Gold4 hoursn/a 51035.293,306 EUR-1,051
Gold1 hourn/a 1,99930.473,069 EUR-921
S&P 5004 hoursn/a 54837.592,985 EUR-801
Gold30 minn/a 3,43629.281,976 EUR-913
Gold5 minn/a 3,52428.72706 EUR-557

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// EMA Trend State Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

fastma = ExponentialAverage[12](close)
slowma = ExponentialAverage[26](close)
apc = ExponentialAverage[2](TotalPrice)

12 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
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run EMA Trend State Filter 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 24 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.46 over 187 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,422 EUR at the tested position size, against a net result of 21,117 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Triple Supertrend Vote With StochRSI

Also a trend strategy.

2.45 PF · 120 trades

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

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