Join waitlist
Strategies / Trend / EMA Filtered Oscillator Long

EMA Filtered Oscillator Long

Buys when the close is above the 125, 680 and 2500 period EMAs while a linear regression oscillator is below zero and rising. Closes the long when the close is above 1.012 times the entry price and the oscillator is falling.

TrendLong onlySwingGold4 hours
1.52Profit factor
2,235Net profit EUR
52.73%Win rate
275Trades
-405Max drawdown
8.13Avg trade

Best run of 45. Gold, 4 hours, spread 0.6, from run pf:2026-10-05-GOLD-4h.tsv:3.

Entry rules, long

  1. The close is above the 125, 680 and 2500 period EMAs.
  2. Enter long at market when not already long and both conditions above are met.
  3. A stop loss 1.8 percent below the fill price is set on entry.

Exit rules

  1. The 1.8 percent stop loss can also close the trade.

Test conditions

PeriodUp to 2026-10-05
InstrumentGold, 4 hours
Spread0.6 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
GoldBest run4 hours1.52 27552.732,235 EUR-405
USD/JPY10 min1.46 12667.46485,160 USD-111,890
Silver15 min1.28 67753.9126,625 USD-4,865
Brent Crude2 min1.27 29958.865,195 EUR-1,169
Brent Crude3 min1.23 35758.265,226 EUR-1,195
USD/JPY30 minn/a 26360.08374,710 USD-198,010
USD/JPY15 minn/a 14262.68282,650 USD-150,650
USD/JPY4 hoursn/a 14757.14280,810 USD-191,580
USD/JPYDailyn/a 7247.22267,610 USD-242,630
USD/JPY2 minn/a 2669.23133,150 USD-67,400
EUR/USD2 minn/a 2737.0478,457 USD-32,580
EUR/USD4 hoursn/a 16157.7634,455 USD-29,468
Silver4 hoursn/a 27442.3418,515 USD-8,353
Nikkei 22530 minn/a 66156.5817,558 USD-6,926
Nikkei 22510 minn/a 37758.6217,060 USD-9,242
Nikkei 2253 minn/a 21661.1115,874 USD-12,355
Nikkei 2255 minn/a 25960.6215,603 USD-11,449
Dow JonesDailyn/a 28345.2314,948 EUR-5,235
Dow Jones15 minn/a 25761.0913,624 EUR-4,709
Silver10 minn/a 58452.5713,280 USD-7,370
Dow Jones30 minn/a 20560.9812,541 EUR-4,674
Silver1 hourn/a 73746.4011,698 USD-9,696
Dow Jones4 hoursn/a 8660.4710,641 EUR-3,706
Nasdaq 10015 minn/a 46860.268,389 EUR-3,930
Dow Jones5 minn/a 11563.487,962 EUR-4,708
Silver5 minn/a 45255.537,168 USD-6,688
Nasdaq 1001 hourn/a 65257.216,736 EUR-4,755
Nasdaq 10030 minn/a 68858.146,457 EUR-4,291
Brent Crude1 hourn/a 44050.455,417 EUR-2,200
Nasdaq 10010 minn/a 33058.485,081 EUR-3,407
Brent Crude1 minn/a 27560.364,732 EUR-2,219
Nasdaq 100Dailyn/a 22837.284,153 EUR-3,421
Brent Crude5 minn/a 42356.033,749 EUR-2,407
US Crude Oil2 minn/a 34257.313,725 EUR-1,401
Gold10 minn/a 28863.892,358 EUR-795
US Crude Oil3 minn/a 38655.182,261 EUR-2,034
Gold1 hourn/a 55455.781,999 EUR-527
Gold15 minn/a 37261.561,816 EUR-957
Gold5 minn/a 23764.981,648 EUR-1,243
S&P 50015 minn/a 34561.451,629 EUR-896
Gold30 minn/a 53657.091,611 EUR-606
GoldDailyn/a 17943.581,427 EUR-416
FTSE 1003 minn/a 7263.891,090 EUR-761
S&P 50030 minn/a 52059.421,018 EUR-959
S&P 5001 minn/a 3271.88803 EUR-508

Charts

Results by run

Top 10 of 45 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 Filtered Oscillator Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

emaa = ExponentialAverage[125](close)
emab = ExponentialAverage[680](close)
emac = ExponentialAverage[2500](close)
myE = (Highest[20](high) + Lowest[20](low)) / 2 + Average[20](close)
src = close - myE / 2
osc = LinearRegression[20](src)

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

EMALinear RegressionSMA
Longer historyRe-run on up to 1,000,000 barsGold · 4 hours · older data 0.00 EUR

Gold had no history beyond the standard run, so both runs used 30,000 bars.

Gold · 4 hours

Bars available30,000
Net, standard 200,000-bar run2,234.80 EUR
Net, long run2,234.80 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 Filtered Oscillator Long 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 45 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.52 over 275 trades.

How large was the drawdown?

The best run had a maximum drawdown of 405 EUR at the tested position size, against a net result of 2,235 EUR.

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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

EMA Crossover With Trend Filter (long and short)

Also a trend strategy.

1.52 PF · 221 trades

Want strategies that are already part of a live portfolio? 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