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.
Best run of 8. USD/JPY, Daily, spread 1, from run pf:2026-10-10-USDJPY-D.tsv:10.
| Period | Up to 2026-10-10 |
| Instrument | USD/JPY, Daily |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.93 | 362 | 41.99 | 3,310,530 USD | -245,700 |
| EUR/USD | Daily | 1.50 | 370 | 44.32 | 161,554 USD | -36,904 |
| USD/JPY | 1 hour | n/a | 3,407 | 37.51 | 386,390 USD | -227,590 |
| EUR/USD | 4 hours | n/a | 1,203 | 37.66 | 43,843 USD | -32,892 |
| Nikkei 225 | Daily | n/a | 381 | 41.21 | 30,215 USD | -13,788 |
| GBP/USD | Daily | n/a | 412 | 40.29 | 11,946 USD | -7,008 |
| Gold | 4 hours | n/a | 807 | 41.88 | 1,898 EUR | -1,415 |
| Gold | 1 hour | n/a | 3,039 | 35.97 | 1,539 EUR | -904 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // 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
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 3,310,530.00 USD |
| Net, long run | 3,310,520.00 USD |
| Net on the older data alone | -10.00 USD |
Questions
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.
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.
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.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.