Join waitlist
Strategies / Trend / Nine EMA Full Candle Entry

Nine EMA Full Candle Entry

Goes long when the bar's low is above the 9-period EMA and short when its high is below it. Closes the long when price crosses under the EMA and closes the short when price crosses over it.

TrendLong & shortSwingUSD/JPYDaily
1.32Profit factor
2,873,250Net profit USD
32.17%Win rate
1,405Trades
-481,010Max drawdown
2,045Avg trade

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

Entry rules, long

  1. No position is open.

Entry rules, short

  1. No position is open.

Exit rules

  1. The close crosses over the 9-period EMA, closing the short.

Test conditions

PeriodUp to 2026-10-10
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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.32 1,40532.172,873,250 USD-481,010
GBP/USDDailyn/a 1,45833.7415,574 USD-9,815
Gold4 hoursn/a 3,11131.242,311 EUR-978

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Nine EMA Full Candle Entry
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ema = ExponentialAverage[9](close)

17 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 -8,910.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 run2,873,250.00 USD
Net, long run2,864,340.00 USD
Net on the older data alone-8,910.00 USD
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 Nine EMA Full Candle Entry 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 1.32 over 1,405 trades.

How large was the drawdown?

The best run had a maximum drawdown of 481,010 USD at the tested position size, against a net result of 2,873,250 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

EMA 9 21 Regime Filtered Crossover

Also a trend strategy.

1.32 PF · 1,557 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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