Join waitlist
Strategies / Trend / Multi-Factor Supertrend Median

Multi-Factor Supertrend Median

The system takes the median of 20 Supertrend deviations, then runs a Supertrend on it. It buys when that trend is up and the median is above zero, and sells short when it is down and the median is below zero.

TrendLong & shortIntradayUSD/JPY30 min
n/aProfit factor
769,430Net profit USD
100.00%Win rate
1Trades
-260,990Max drawdown
769,430Avg trade

Best run of 68. USD/JPY, 30 min, spread 1, from run sweeps:2026-10-12-USDJPY-30m-opt.tsv:33.

Entry rules, long

  1. The median of the 20 deviations is above 0.

Entry rules, short

  1. The median of the 20 deviations is below 0.

Exit rules

  1. A bearish Supertrend closes any open long.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, 30 minutes
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run30 minn/a 1100.00769,430 USD-260,990
USD/JPY4 hoursn/a 1100.00510,120 USD-483,860
USD/JPY1 hourn/a 1100.00508,180 USD-484,160
USD/JPY10 minn/a 1100.00482,120 USD-246,630
USD/JPY15 minn/a 1100.00463,300 USD-245,400
Nikkei 2254 hoursn/a 1100.0059,835 USD-11,811
Nikkei 22530 minn/a 1100.0059,558 USD-12,879
Nikkei 2251 hourn/a 1100.0059,538 USD-12,691
Nikkei 225Dailyn/a 1100.0058,029 USD-31,906
Dow JonesDailyn/a 1100.0050,988 EUR-11,142
Nikkei 22515 minn/a 1100.0046,856 USD-13,076
Nikkei 22510 minn/a 1100.0039,584 USD-12,992
Nikkei 2255 minn/a 1100.0032,815 USD-13,126
Nikkei 2253 minn/a 1100.0030,905 USD-13,081
Nasdaq 100Dailyn/a 1100.0030,738 EUR-5,914
Nasdaq 1004 hoursn/a 1100.0029,412 EUR-5,975
Nasdaq 1001 hourn/a 1100.0029,278 EUR-6,233
Nasdaq 10030 minn/a 1100.0028,966 EUR-6,277
Nikkei 2252 minn/a 1100.0025,827 USD-13,121
DAX 40Dailyn/a 1100.0024,716 EUR-5,862
Nasdaq 10015 minn/a 1100.0023,583 EUR-6,288
Dow Jones15 minn/a 1100.0023,095 EUR-11,342
Dow Jones30 minn/a 1100.0023,045 EUR-11,342
Dow Jones1 hourn/a 1100.0022,952 EUR-11,342
Dow Jones4 hoursn/a 1100.0022,574 EUR-11,316
DAX 404 hoursn/a 1100.0019,763 EUR-5,779
DAX 4030 minn/a 1100.0019,757 EUR-5,810
DAX 401 hourn/a 1100.0019,174 EUR-5,810
Dow Jones10 minn/a 1100.0017,761 EUR-8,394
Nasdaq 10010 minn/a 1100.0017,431 EUR-6,298
Nikkei 2251 minn/a 1100.0015,995 USD-13,148
Dow Jones5 minn/a 1100.0014,253 EUR-8,419
Nasdaq 1005 minn/a 1100.0013,728 EUR-5,875
DAX 4015 minn/a 1100.0012,863 EUR-5,814
DAX 4010 minn/a 1100.0010,217 EUR-4,474
FTSE 100Dailyn/a 1100.009,513 EUR-3,643
Nasdaq 1003 minn/a 1100.008,899 EUR-5,786
DAX 405 minn/a 1100.008,679 EUR-4,463
Dow Jones3 minn/a 1100.007,774 EUR-7,639
S&P 500Dailyn/a 1100.007,734 EUR-1,238
Nasdaq 1001 minn/a 1100.007,198 EUR-3,760
Nasdaq 1002 minn/a 1100.007,195 EUR-3,756
S&P 50030 minn/a 1100.006,637 EUR-1,319
S&P 5001 hourn/a 1100.006,515 EUR-1,317
S&P 5004 hoursn/a 1100.006,500 EUR-1,298
Dow Jones2 minn/a 1100.006,378 EUR-5,676
FTSE 1001 hourn/a 1100.006,240 EUR-3,326
FTSE 1004 hoursn/a 1100.006,176 EUR-3,319
Dow Jones1 minn/a 1100.005,615 EUR-4,166
FTSE 10030 minn/a 1100.005,111 EUR-3,080
S&P 50015 minn/a 1100.004,992 EUR-1,319
GoldDailyn/a 1100.004,011 EUR-1,534
FTSE 10010 minn/a 1100.003,638 EUR-1,320
S&P 50010 minn/a 1100.003,633 EUR-1,323
Gold1 hourn/a 1100.003,572 EUR-1,599
Gold4 hoursn/a 1100.003,522 EUR-1,586
FTSE 1005 minn/a 1100.003,115 EUR-1,320
S&P 5005 minn/a 1100.003,093 EUR-1,332
Gold30 minn/a 1100.003,006 EUR-1,624
Gold15 minn/a 1100.002,855 EUR-1,628
DAX 401 minn/a 1100.002,458 EUR-1,831
Gold10 minn/a 1100.002,416 EUR-1,629
Gold5 minn/a 1100.002,217 EUR-1,631
FTSE 1003 minn/a 1100.001,931 EUR-1,372
S&P 5003 minn/a 1100.001,699 EUR-1,330
FTSE 1002 minn/a 1100.001,379 EUR-1,265
S&P 5002 minn/a 1100.001,319 EUR-699
S&P 5001 minn/a 1100.001,249 EUR-396

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Multi-Factor Supertrend Median
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE init = 0
ONCE med = 0
ONCE up = 0
ONCE dn = 0
ONCE dir = 1
ONCE st = 0

hlc = (high + low + close) / 3
atrin = AverageTrueRange[10](close)

114 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

SuperTrendATRWilder Average
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The best run has only 1 trades, which is a small sample to judge it on.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Multi-Factor Supertrend Median 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 68 market and timeframe combinations. The best run by trade count was USD/JPY, 30 minutes, with 1 trades.

How large was the drawdown?

The best run had a maximum drawdown of 260,990 USD at the tested position size, against a net result of 769,430 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 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