Join today
Strategies / Trend / Ichimoku Cloud Exit

Ichimoku Cloud Exit: cloud breakouts closed on the kijun

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.

TrendLong & shortSwingS&P 500Daily
n/aProfit factor
1,504Net profit EUR
36.25%Win rate
240Trades
-795Max drawdown
6.27Avg trade

Best run of 5. S&P 500, Daily, spread 1, from run sweeps:2026-09-23-USA500-D-opt.tsv:5.

Entry rules, long

  1. Members only
  2. Green bar (close above open)
  3. Tenkan is above kijun
  4. The 20-bar range is at least 0.5
  5. The last entry was not a long

Entry rules, short

  1. Members only
  2. Red bar (close below open)
  3. Tenkan is below kijun
  4. The 20-bar range is at least 0.5
  5. The last entry was not a short

Exit rules

  1. Members only
  2. Close a short when price crosses above the kijun line
  3. No stop loss or target

Test conditions

PeriodUp to 2026-09-23
InstrumentS&P 500, Daily
Spread1 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-24

Parameters

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

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best runDailyn/a 24036.251,504 EUR-795
USD/JPYDailyn/a 22740.091,393,790 JPY-349,940
USD/JPY1 minn/a 3141.9431,710 JPY-11,240
Brent CrudeDailyn/a 10539.0511,394 EUR-4,439
Nasdaq 100Dailyn/a 18337.708,179 EUR-3,734

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-500K-250K1.0M2.0MUSD/JPY · DailyUSD/JPY · 1 minBrent Crude · DailyNasdaq 100 · DailyS&P 500 · Daily

The code

ProBuilder, rewritten to house standard

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

Known weaknesses

  • There is no stop loss. A trade stays open until price crosses the kijun, which can be far away after a strong move.
  • Only sweep data exists, so profit factor was not recorded.
  • Win rate on the best run was 36.25%, and every listed run stayed between 36.25% and 41.94%.
  • The alternating rule means a second long in a strong uptrend is skipped until a short has been taken.

Indicators used

Ichimoku

How to load it

  1. Copy the code with the copy button above the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Questions

About this strategy

Can Ichimoku Cloud Exit trade live in ProOrder?

Yes, it is a ProOrder system with a kijun based exit. The code was rewritten and needs a compile check first.

Which instruments was it tested on?

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.

How much drawdown at 1 contract?

The best run on S&P 500 Daily had a max drawdown of EUR 795.41. USD/JPY Daily reached JPY 349,940.

Why daily bars?

The default settings of 9, 26 and 52 were built for daily charts, and most tests here are Daily.

Related

Strategies like this one

Ichimoku Cloud Confluence

Uses the same indicator.

1.59 PF · 302 trades

Candle Body Sum Intraday

Best run on the same market, S&P 500.

2.86 PF · 124 trades

Long-Term Moving Average Cross

Also a trend strategy.

12.31 PF · 61 trades

Ichimoku fans are welcome. Join the ProRealAlgos community waitlist.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs