It sells short when the close is above the 50 EMA but has slipped under the 2 EMA. Trades run on weekdays and skip January, March and October. Stop and target are both 2% from entry.
Best run of 2. EUR/USD, 30 min, spread 1, from run sweeps:2026-09-17-EURUSD-30m-opt.tsv:2.
| Period | Up to 2026-09-17 |
| Instrument | EUR/USD, 30 minutes |
| Spread | 1 points |
| Contracts | 1 |
| 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-09-17 |
| positionSize Contracts per trade | 1 |
| pricePeriod EMA length for the price line (1 = the close) | 1 |
| dipPeriod Short EMA the price line must fall below | 2 |
| trendPeriod EMA the price line must still be above | 50 |
| skipMonthFirst No entries in January | 1 |
| skipMonthSecond No entries in March | 3 |
| skipMonthThird No entries in October | 10 |
| stopLossPct Protective stop, percent of entry price | 2 |
| takeProfitPct Profit target, percent of entry price | 2 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 30 min | n/a | 216 | 51.39 | 23,173 USD | -22,636 |
| USD/JPY | 5 min | n/a | 57 | 54.39 | 166,970 JPY | -146,470 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Simplicissimus Short // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Short only // Timeframe tested: 30 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade pricePeriod = 1 // EMA length for the price line (1 = the close) dipPeriod = 2 // short EMA the price line must fall below trendPeriod = 50 // EMA the price line must still be above skipMonthFirst = 1 // no entries in January skipMonthSecond = 3 // no entries in March skipMonthThird = 10 // no entries in October stopLossPct = 2 // protective stop, percent of entry price takeProfitPct = 2 // profit target, percent of entry price // --- Indicators --- tradeMonth = OpenMonth <> skipMonthFirst AND OpenMonth <> skipMonthSecond AND OpenMonth <> skipMonthThird tradeDay = OpenDayOfWeek >= 1 AND OpenDayOfWeek <= 5 priceLine = ExponentialAverage[pricePeriod](close) dipMA = ExponentialAverage[dipPeriod](close) trendMA = ExponentialAverage[trendPeriod](close)
11 more lines: the entry and exit rules.
Read this first
Questions
Yes, it is short only with percent stop and target. The rewritten code is not compile-checked, so demo test it.
EUR/USD 30 minutes made USD 23,173.0 over 216 trades. USD/JPY 5 minutes made JPY 166,970.0 with a JPY 146,470.0 drawdown on 57 trades.
With 1 contract the best run had a USD 22,636.0 drawdown. That is the minimum buffer to plan for.
The code skips January, March and October. Those filters cut trades and may be fitted to the tested data, so check them on your own data.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.