Here the Ichimoku cloud is widened by 1 ATR(14) to make two bands. The system buys when close sits at or below the lower band while MACD, Stochastic and the 43 period EMA all point up. It exits at 60 points profit, a 100 point stop or when close crosses below the upper band.
Best run of 5. S&P 500, 1 hour, spread 1, from run pf:2026-09-16-USA500-1h.tsv:2.
| Period | Up to 2026-09-16 |
| Instrument | S&P 500, 1 hour |
| Spread | 1 points |
| Contracts | 5 |
| 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-16 |
| positionSize Contracts per trade, as published | 5 |
| tenkanPeriod Ichimoku conversion line length | 9 |
| kijunPeriod Ichimoku base line length, also the cloud shift | 26 |
| senkouPeriod Ichimoku span B length | 52 |
| kumoAtrMultiplier ATR multiple for the bands around the cloud level | 1 |
| atrPeriod ATR length | 14 |
| macdFast MACD fast length | 21 |
| macdSlow MACD slow length | 44 |
| macdSignalPeriod MACD signal length | 24 |
| stochPeriod Stochastic %K length | 28 |
| stochSmooth Stochastic %K smoothing | 8 |
| stochSignalPeriod SMA of %K used as its signal line | 22 |
| entryOffset Close plus this must be at or below the lower band | 5 |
| trendPeriod EMA trend filter length | 43 |
| stopLossPoints Protective stop (points) | 100 |
| takeProfitPoints Profit target (points) | 60 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | 1 hour | 1.29 | 383 | 65.80 | 7,842 EUR | -3,214 |
| FTSE 100 | 4 hours | 1.22 | 199 | 66.33 | 6,815 EUR | -3,302 |
| Gold | 1 hour | 1.22 | 350 | 63.14 | 3,521 EUR | -1,608 |
| FTSE 100 | 5 min | 1.21 | 552 | 57.43 | 4,699 EUR | -3,566 |
| S&P 500 | 15 min | 1.13 | 581 | 64.03 | 3,873 EUR | -3,655 |
Charts
Above 1.0 made money, below 1.0 lost money.
Longer history
On FTSE 100 5 minutes, 940,000 bars were available: the long run lost 16,497.5 EUR against a 4,699 EUR profit in the standard run, so the older data alone lost 21,196.5 EUR.
| Bars available | 940,000 |
| Net, standard 200,000-bar run | 4,699.00 EUR |
| Net, long run | -16,497.50 EUR |
| Net on the older data alone | -21,196.50 EUR |
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.
// ============================================================ // Kumo ATR Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: 1 hour // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 1000 // --- Parameters --- positionSize = 5 // contracts per trade, as published tenkanPeriod = 9 // Ichimoku conversion line length kijunPeriod = 26 // Ichimoku base line length, also the cloud shift senkouPeriod = 52 // Ichimoku span B length kumoAtrMultiplier = 1 // ATR multiple for the bands around the cloud level atrPeriod = 14 // ATR length macdFast = 21 // MACD fast length macdSlow = 44 // MACD slow length macdSignalPeriod = 24 // MACD signal length stochPeriod = 28 // Stochastic %K length stochSmooth = 8 // Stochastic %K smoothing stochSignalPeriod = 22 // SMA of %K used as its signal line entryOffset = 5 // close plus this must be at or below the lower band trendPeriod = 43 // EMA trend filter length stopLossPoints = 100 // protective stop (points) takeProfitPoints = 60 // profit target (points) // --- Indicators --- // Ichimoku cloud tenkanLine = (Highest[tenkanPeriod](high) + Lowest[tenkanPeriod](low)) / 2 kijunLine = (Highest[kijunPeriod](high) + Lowest[kijunPeriod](low)) / 2 spanA = (tenkanLine[kijunPeriod] + kijunLine[kijunPeriod]) / 2 spanB = ((Highest[senkouPeriod](high[kijunPeriod])) + Lowest[senkouPeriod](low[kijunPeriod])) / 2 priceInput = CustomClose IF priceInput >= spanA AND priceInput >= spanB THEN aboveCloud = 1 ELSE aboveCloud = 0 ENDIF IF priceInput <= spanA AND priceInput <= spanB THEN belowCloud = 1 ELSE belowCloud = 0 ENDIF // Inside the cloud, keep the side price came from. IF aboveCloud[1] = 1 AND aboveCloud = 0 AND belowCloud = 0 THEN aboveCloud = 1 ELSIF belowCloud[1] = 1 AND belowCloud = 0 AND aboveCloud = 0 THEN belowCloud = 1 ENDIF IF aboveCloud = 1 THEN cloudState = 1 ELSE cloudState = -1 ENDIF turnedBearish = (cloudState[1] = 1 AND cloudState = -1) turnedBullish = (cloudState[1] = -1 AND cloudState = 1) bearishCloud = (spanA < spanB) bullishCloud = (spanA > spanB) // The cloud edge price just crossed becomes the reference level. IF turnedBearish THEN IF bearishCloud THEN kumoLevel = spanA ELSIF bullishCloud THEN kumoLevel = spanB ENDIF ELSIF turnedBullish THEN IF bearishCloud THEN kumoLevel = spanB ELSIF bullishCloud THEN kumoLevel = spanA ENDIF ELSE kumoLevel = kumoLevel[1] ENDIF atrValue = AverageTrueRange[atrPeriod](close) upperKumoBand = kumoLevel + (kumoAtrMultiplier * atrValue) lowerKumoBand = kumoLevel - (kumoAtrMultiplier * atrValue) // Momentum filters macdMain = MACDline[macdFast, macdSlow, macdSignalPeriod](close) macdTrigger = ExponentialAverage[macdSignalPeriod](MACDline[macdFast, macdSlow, macdSignalPeriod](close)) stochK = Stochastic[stochPeriod, stochSmooth](close) stochSignal = Average[stochSignalPeriod](Stochastic[stochPeriod, stochSmooth](close)) trendMA = ExponentialAverage[trendPeriod](close)
17 more lines: the entry and exit rules.
Read this first
Questions
Yes. It is fully automated. Repeat signals do not add to an open trade, so it holds one position of 5 contracts at most.
FTSE 100 4 hours made 6,815 EUR and Gold 1 hour made 3,521 EUR, both with a profit factor of 1.22. FTSE 100 5 minutes reached 1.21.
On S&P 500 1 hour the worst drawdown was 3,214.25 EUR at 5 contracts, with an average trade of 20.47 EUR.
It gave the best result for the S&P 500. The 15 minute chart made 3,873.15 EUR with a similar drawdown, so the edge was thinner there.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.