Ichimoku Cloud Explained: Components, Signals and Rules for Bots
The five Ichimoku lines - Tenkan, Kijun, Senkou A and B, Chikou - what each shows, how the cloud defines trend and support, and how to turn Ichimoku into testable trading-bot rules.
Ichimoku Kinko Hyo - “one-glance equilibrium chart” - was developed by Goichi Hosoda and published in the late 1960s. It packs trend direction, momentum and support/resistance into five lines and a shaded cloud. On a chart it looks busy; in code it is precise, which makes Ichimoku surprisingly well suited to rule-based trading bots.
The five components
With the standard settings (9, 26, 52):
| Line | Calculation | Shows |
|---|---|---|
| Tenkan-sen (conversion) | (9-period high + 9-period low) / 2 | Short-term equilibrium |
| Kijun-sen (base) | (26-period high + 26-period low) / 2 | Medium-term equilibrium |
| Senkou Span A | (Tenkan + Kijun) / 2, plotted 26 periods ahead | Cloud edge 1 |
| Senkou Span B | (52-period high + 52-period low) / 2, plotted 26 ahead | Cloud edge 2 |
| Chikou Span | Close plotted 26 periods back | Current price vs past |
The cloud (Kumo) is the area between Senkou A and B.
Note that the “lines” are midpoints of highs and lows, not moving averages of closes. They react to new extremes rather than to every close.
How to read Ichimoku
- Price above the cloud - uptrend; below - downtrend; inside - no clear trend.
- Cloud colour - Senkou A above B is bullish, B above A bearish.
- Cloud thickness - thick clouds mark strong support or resistance zones.
- Tenkan/Kijun cross - momentum shift; stronger when it happens on the trend side of the cloud.
- Kijun-sen - often used as a trailing stop or pullback level.
- Chikou above past price - confirms that today’s price is above where it was 26 periods ago.
Turning Ichimoku into bot rules
Choose a small set of conditions with clear jobs:
Trend filter: close above the cloud, and the future cloud bullish (Senkou A > Senkou B).
Entry: Tenkan crosses above Kijun while the trend filter holds; or price pulls back to Kijun and closes back above it.
Stop: below Kijun or below the cloud, plus a buffer of 0.5 × ATR.
Exit: close below Kijun, or a trailing stop along Kijun.
That is three or four conditions, each traceable to a component’s purpose.
A worked example
EURJPY H4 trend bot:
- Long when close > cloud, cloud bullish, Chikou above price 26 bars ago.
- Enter on Tenkan/Kijun bullish cross.
- Stop below the lower cloud edge or 2 × ATR, whichever is closer to entry but at least 1 × ATR.
- Trail with Kijun-sen; exit on close below it.
The system trades rarely and holds for days to weeks. Results depend heavily on trending years, so test across several regimes.
Pitfalls
- Using all signals at once. Requiring every Ichimoku condition produces very few trades and an overfitted rule set.
- Shifted lines in code. Senkou spans are plotted forward and Chikou backward. When coding, use values available at the time of the decision - a common source of look-ahead bugs.
- Ranges. Inside or around a thin cloud, crossovers whipsaw.
- Changing settings casually. Shorter settings for crypto or 24-hour markets are sometimes used, but they change the indicator’s character; test them as a new strategy.
Key takeaways
- Ichimoku combines equilibrium lines, a projected cloud and a lagging close.
- Price versus cloud defines the trend; Tenkan/Kijun crosses time entries; Kijun works as a stop.
- Use a small subset of conditions with clear roles.
- Watch for look-ahead mistakes with the shifted spans.
FAQ
Why are the settings 9, 26 and 52?
They come from the original design for Japanese markets with a six-day trading week: about one and a half weeks, one month and two months. Many traders keep them on all markets because they are widely watched.
Does the cloud predict the future?
No. The cloud is plotted 26 periods ahead, but it is built from past prices. It shows where past support and resistance will sit, not where price will go.
Is Ichimoku good for automated trading?
It can be, because every component is defined exactly. The challenge is choosing a small set of conditions instead of combining all five lines into an overfitted rule.
Sources and further reading
- StockCharts ChartSchool: Ichimoku Cloud - chartschool.stockcharts.com
- StockCharts ChartSchool: Moving Averages - Simple and Exponential - chartschool.stockcharts.com