Join waitlist
Strategies / Trend / Supertrend Flip With EMA Filter

Supertrend Flip With EMA Filter

Buys when Supertrend (ATR 10, factor 1.8) flips up while price is above its 200 EMA, and sells short when it flips down while price is below that EMA. A flip against an open position closes it.

TrendLong & shortSwingUSD/JPYDaily
1.93Profit factor
3,310,530Net profit USD
41.99%Win rate
362Trades
-245,700Max drawdown
9,145Avg trade

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

Entry rules, long

  1. The close is above the 200 EMA.

Entry rules, short

  1. The close is below the 200 EMA.

Exit rules

  1. An uptrend flip while short closes the short, and reverses to long if the close is above the 200 EMA.
  2. No stop or target is set.

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.93 36241.993,310,530 USD-245,700
EUR/USDDaily1.50 37044.32161,554 USD-36,904
USD/JPY1 hourn/a 3,40737.51386,390 USD-227,590
EUR/USD4 hoursn/a 1,20337.6643,843 USD-32,892
Nikkei 225Dailyn/a 38141.2130,215 USD-13,788
GBP/USDDailyn/a 41240.2911,946 USD-7,008
Gold4 hoursn/a 80741.881,898 EUR-1,415
Gold1 hourn/a 3,03935.971,539 EUR-904

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Supertrend Flip With EMA Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE fub = 0
ONCE flb = 0
ONCE dir = 1

myAtr = AverageTrueRange[10](close)
ub = MedianPrice + 1.8 * myAtr
lb = MedianPrice - 1.8 * myAtr

51 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

SuperTrendEMAATR
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data -10.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 run3,310,530.00 USD
Net, long run3,310,520.00 USD
Net on the older data alone-10.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 Supertrend Flip With EMA 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 8 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.93 over 362 trades.

How large was the drawdown?

The best run had a maximum drawdown of 245,700 USD at the tested position size, against a net result of 3,310,530 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

200-Period Average Two-Way Crossover

Also a trend strategy.

1.92 PF · 370 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