Join waitlist
Strategies / Trend / EMA Ribbon Slope Alignment

EMA Ribbon Slope Alignment

The strategy buys when five EMA slopes are all positive and ordered from fastest to slowest, with RSI between 50 and 70 and above-average volume. It sells short on the mirror setup and closes when the slope ordering breaks or the fan score weakens.

TrendLong & shortSwingUSD/JPYDaily
1.60Profit factor
12,540Net profit USD
44.10%Win rate
161Trades
-2,140Max drawdown
77.89Avg trade

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

Entry rules, long

  1. The fastest slope minus the slowest slope is above 0.8.
  2. RSI(14) is between 50 and 70, and volume is above its 20-bar average.
  3. When flat, one contract is bought with a stop 2 ATR away and a target at 2 times that distance.

Entry rules, short

  1. The fastest slope minus the slowest slope is below minus 0.8.
  2. RSI(14) is between 30 and 50, and volume is above its 20-bar average.
  3. When flat, one contract is sold short with a stop 2 ATR away and a target at 2 times that distance.

Exit rules

  1. An open short closes at market when the slope ordering breaks or the fan score rises above minus 0.2.

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 runDaily1.60 16144.1012,540 USD-2,140
Nikkei 225Dailyn/a 14645.218,112 USD-7,342
Dow Jones4 hoursn/a 6055.006,908 EUR-1,912
Nasdaq 100Dailyn/a 13945.324,183 EUR-3,724
Dow Jones30 minn/a 4456.823,207 EUR-2,481
Nasdaq 1001 hourn/a 14651.372,330 EUR-1,108
Nasdaq 1004 hoursn/a 16445.731,998 EUR-1,758
Brent Crude1 hourn/a 56243.061,951 EUR-1,809
DAX 401 hourn/a 8048.75802 EUR-658
Gold1 hourn/a 8436.90551 EUR-324
USD/JPY30 minn/a 1241.67520 USD-430
USD/JPY15 minn/a 944.44490 USD-300
DAX 403 minn/a 366.67418 EUR-356
USD/JPY10 minn/a 1100.00230 USD-0.00
Nikkei 2252 minn/a 1100.0070.90 USD-47.60
DAX 402 minn/a 1100.0043.60 EUR-2.00
Nasdaq 1002 minn/a 1100.0024.50 EUR-16.30

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA Ribbon Slope Alignment
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

emaa = ExponentialAverage[8](close)
emab = ExponentialAverage[13](close)
emac = ExponentialAverage[21](close)
emad = ExponentialAverage[34](close)
emae = ExponentialAverage[55](close)

sa = (emaa - emaa[5]) / emaa[5] * 100
sb = (emab - emab[5]) / emab[5] * 100
sc = (emac - emac[5]) / emac[5] * 100
sd = (emad - emad[5]) / emad[5] * 100
se = (emae - emae[5]) / emae[5] * 100

45 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

ATREMARSISMAVolume
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 run12,540.00 USD
Net, long run12,540.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 EMA Ribbon Slope Alignment 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 17 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.60 over 161 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,140 USD at the tested position size, against a net result of 12,540 USD.

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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

EMA Crossover With ATR Stops

Also a trend strategy.

1.60 PF · 222 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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