Storm Short looks for an uptrend that has run far: close above the PEMA (eight chained 50-period EMAs), which itself sits above the 100-period Hull average. It sells the first down close after an up close, if ATR(5) is above 40. Trades use a 2% stop and a 2% target, and skip Mondays, April and October.
Best run of 9. DAX 40, 4 hours, spread 3, from run sweeps:2026-09-23-DAX40-4h-opt.tsv:2.
| Period | Up to 2026-09-23 |
| Instrument | DAX 40, 4 hours |
| Spread | 3 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-24 |
| positionSize Contracts per trade | 1 |
| pemaPeriod EMA length inside the PEMA | 50 |
| hullPeriod Hull moving average length | 100 |
| atrPeriod ATR length for the volatility filter | 5 |
| atrMinimum Only trade when ATR is above this | 40 |
| skipMonthA No trades in April | 4 |
| skipMonthB No trades in October | 10 |
| firstTradeDay Trade from Tuesday | 2 |
| lastTradeDay To Friday | 5 |
| stopLossPct Protective stop, percent of entry price | 2 |
| takeProfitPct Target, percent of entry price | 2 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 4 hours | n/a | 321 | 53.89 | 5,089 EUR | -4,615 |
| FTSE 100 | Daily | n/a | 115 | 57.39 | 2,066 EUR | -1,127 |
| FTSE 100 | 1 hour | n/a | 77 | 57.14 | 1,153 EUR | -926 |
| FTSE 100 | 15 min | n/a | 19 | 68.42 | 819 EUR | -351 |
| Gold | 10 min | n/a | 2 | 100.00 | 199 EUR | -46.10 |
| S&P 500 | 30 min | n/a | 7 | 71.43 | 178 EUR | -78.70 |
| Gold | 15 min | n/a | 1 | 100.00 | 103 EUR | -15.60 |
| Gold | 5 min | n/a | 1 | 100.00 | 97.90 EUR | -64.20 |
| Gold | 3 min | n/a | 1 | 100.00 | 97.60 EUR | -78.70 |
Charts
The code
// ============================================================ // Storm Short PEMA HMA // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Short only // Timeframe tested: 4 hours // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade pemaPeriod = 50 // EMA length inside the PEMA hullPeriod = 100 // Hull moving average length atrPeriod = 5 // ATR length for the volatility filter atrMinimum = 40 // only trade when ATR is above this skipMonthA = 4 // no trades in April skipMonthB = 10 // no trades in October firstTradeDay = 2 // trade from Tuesday lastTradeDay = 5 // to Friday stopLossPct = 2 // protective stop, percent of entry price takeProfitPct = 2 // target, percent of entry price // --- Indicators --- // PEMA: eight chained EMAs combined with binomial weights to cut lag emaOne = ExponentialAverage[pemaPeriod](close) emaTwo = ExponentialAverage[pemaPeriod](emaOne) emaThree = ExponentialAverage[pemaPeriod](emaTwo) emaFour = ExponentialAverage[pemaPeriod](emaThree) emaFive = ExponentialAverage[pemaPeriod](emaFour) emaSix = ExponentialAverage[pemaPeriod](emaFive) emaSeven = ExponentialAverage[pemaPeriod](emaSix) emaEight = ExponentialAverage[pemaPeriod](emaSeven) pemaValue = (8 * emaOne) - (28 * emaTwo) + (56 * emaThree) - (70 * emaFour) + (56 * emaFive) - (28 * emaSix) + (8 * emaSeven) - emaEight hullMA = WeightedAverage[ROUND(SQRT(hullPeriod))](2 * WeightedAverage[ROUND(hullPeriod / 2)](close) - WeightedAverage[hullPeriod](close)) atrValue = AverageTrueRange[atrPeriod](close) tradingWindow = OpenMonth <> skipMonthA AND OpenMonth <> skipMonthB AND OpenDayOfWeek >= firstTradeDay AND OpenDayOfWeek <= lastTradeDay
11 more lines: the entry and exit rules.
Setup
Questions
Yes, it is fully automated with a fixed 2% stop and target. The rewritten code has not been compile checked yet, so test in demo first.
DAX 40 4 hours made 5,089.30 EUR over 321 trades. FTSE 100 Daily made 2,065.60 EUR, and S&P 500 and Gold produced only a handful of trades.
With 1 contract and a 3 point spread, DAX 40 4 hours had a max drawdown of 4,615.10 EUR.
The ATR(5) filter of 40 needs bars with real range, which the 4 hour DAX 40 chart delivers. On short Gold charts it barely triggered.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.