The strategy buys a green bar that closes above both cloud spans while tenkan is above kijun. Shorts mirror this below the cloud. Positions close when price crosses the kijun line, and entries must alternate between long and short.
Best run of 5. S&P 500, Daily, spread 1, from run sweeps:2026-09-23-USA500-D-opt.tsv:5.
| Period | Up to 2026-09-23 |
| Instrument | S&P 500, Daily |
| 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-24 |
| positionSize Contracts per trade | 1 |
| tenkanPeriod Conversion line length | 9 |
| kijunPeriod Base line length | 26 |
| spanBPeriod Leading span B length | 52 |
| cloudShift Bars the cloud is shifted | 26 |
| rangePeriod Window for the momentum check | 20 |
| minRange Minimum high-low range over rangePeriod | 0.5 |
| minBarsSinceTrade Bars since the last trade before a new entry | 1 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| S&P 500Best run | Daily | n/a | 240 | 36.25 | 1,504 EUR | -795 |
| USD/JPY | Daily | n/a | 227 | 40.09 | 1,393,790 JPY | -349,940 |
| USD/JPY | 1 min | n/a | 31 | 41.94 | 31,710 JPY | -11,240 |
| Brent Crude | Daily | n/a | 105 | 39.05 | 11,394 EUR | -4,439 |
| Nasdaq 100 | Daily | n/a | 183 | 37.70 | 8,179 EUR | -3,734 |
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.
// ============================================================ // Ichimoku Cloud Exit // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade tenkanPeriod = 9 // conversion line length kijunPeriod = 26 // base line length spanBPeriod = 52 // leading span B length cloudShift = 26 // bars the cloud is shifted forward rangePeriod = 20 // window for the momentum check minRange = 0.5 // skip entries when the range over rangePeriod is smaller than this minBarsSinceTrade = 1 // bars that must pass since the last trade // Direction of the last entry: 1 long, -1 short, 0 none yet. ONCE lastDirection = 0 // --- Indicators --- tenkanLine = (Highest[tenkanPeriod](high) + Lowest[tenkanPeriod](low)) / 2 kijunLine = (Highest[kijunPeriod](high) + Lowest[kijunPeriod](low)) / 2 spanA = (tenkanLine[cloudShift] + kijunLine[cloudShift]) / 2 spanB = (Highest[spanBPeriod](high[cloudShift]) + Lowest[spanBPeriod](low[cloudShift])) / 2 enoughBarsPassed = (BarIndex - TradeIndex) >= minBarsSinceTrade IF ABS(Highest[rangePeriod](high) - Lowest[rangePeriod](low)) < minRange THEN hasMomentum = 0 ELSE hasMomentum = 1 ENDIF
30 more lines: the entry and exit rules.
Read this first
Questions
Yes, it is a ProOrder system with a kijun based exit. The code was rewritten and needs a compile check first.
S&P 500, USD/JPY, Brent Crude and Nasdaq 100, all profitable. USD/JPY 1 minute had only 31 trades, so that result means little.
The best run on S&P 500 Daily had a max drawdown of EUR 795.41. USD/JPY Daily reached JPY 349,940.
The default settings of 9, 26 and 52 were built for daily charts, and most tests here are Daily.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.