It goes long when the close is above the SuperTrend (3, 10) and CCI(20) is above -100, and short when the low touches the SuperTrend with CCI below 100. Entries alternate between long and short. Exits come from the SuperTrend flip, a 42 point stop, or a 1760 profit target in account currency.
Best run of 5. GBP/USD, Daily, spread 1.5, from run pf:2026-09-24-GBPUSD-D.tsv:1.
| Period | Up to 2026-09-24 |
| Instrument | GBP/USD, Daily |
| Spread | 1.5 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 |
| superTrendMultiplier SuperTrend ATR multiple | 3 |
| superTrendPeriod SuperTrend ATR length | 10 |
| cciPeriod CCI length | 20 |
| cciLongLevel Longs need CCI above this | -100 |
| cciShortLevel Shorts need CCI below this | 100 |
| stopLossPoints Protective stop in points | 42 |
| takeProfitMoney Target in account currency | 1760 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GBP/USDBest run | Daily | 1.72 | 561 | 14.44 | 14,408 USD | -3,343 |
| EUR/USD | 1 hour | n/a | 6,125 | 29.99 | 51,778 USD | -35,399 |
| Silver | 4 hours | n/a | 1,252 | 30.35 | 20,386 USD | -8,402 |
| Gold | Daily | n/a | 567 | 33.51 | 1,893 EUR | -636 |
| Gold | 4 hours | n/a | 1,369 | 34.26 | 1,709 EUR | -807 |
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.
// ============================================================ // SuperTrend CCI // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade superTrendMultiplier = 3 // SuperTrend ATR multiple superTrendPeriod = 10 // SuperTrend ATR length cciPeriod = 20 // CCI length cciLongLevel = -100 // longs need CCI above this cciShortLevel = 100 // shorts need CCI below this stopLossPoints = 42 // protective stop in points takeProfitMoney = 1760 // target in account currency // --- Indicators --- superTrendValue = Supertrend[superTrendMultiplier, superTrendPeriod] touchesSuperTrend = low <= superTrendValue aboveSuperTrend = close > superTrendValue cciValue = CCI[cciPeriod](TypicalPrice) // Alternation flags: after a long, the next entry must be a short, and vice versa ONCE longTaken = 0 ONCE shortTaken = 0
36 more lines: the entry and exit rules.
Read this first
Questions
Yes. The order blocks are kept in the tested sequence because an exit and a new entry can fire on the same bar. The rewritten code was not compile-checked, so test it first.
EUR/USD 1 hour, Silver 4 hours and Gold on daily and 4 hours were all positive. EUR/USD 1 hour made USD 51,778 over 6,125 trades.
The GBP/USD daily best run had a max drawdown of USD 3,343.2 against USD 14,408.1 net profit over 561 trades.
The daily chart gave the best recorded result, and the SuperTrend (3, 10) flips less often there.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.