Ichimoku Cloud indicator: settings, the five lines and how to read it
How the Ichimoku Cloud works: the conversion line, base line, two leading spans and lagging span, the 9-26-52 settings, and free Ichimoku alerts.
The Ichimoku Cloud (Ichimoku Kinko Hyo) is a trend indicator that draws five lines on the price chart. Two of them, shifted forward in time, fill a shaded "cloud". Price above the cloud suggests an uptrend, price below it a downtrend, and price inside it a market without direction. In SuperCharting you add it free from Indicators by searching "ichimoku". It uses the standard settings 9, 26, 52 and 26.
The five lines and how each is calculated
Every Ichimoku line except the lagging span is a midpoint: the highest high plus the lowest low of a period, divided by two.
| Line | Japanese name | Calculation (default settings) | Colour |
|---|---|---|---|
| Conversion Line | Tenkan-sen | Midpoint of the last 9 bars | Blue |
| Base Line | Kijun-sen | Midpoint of the last 26 bars | Dark red |
| Leading Span A | Senkou Span A | (Conversion + Base) / 2, drawn ahead | Light green |
| Leading Span B | Senkou Span B | Midpoint of the last 52 bars, drawn ahead | Light red |
| Lagging Span | Chikou Span | The close, drawn behind | Green |
The two leading spans are plotted 25 bars to the right of the bar that produced them, so the cloud reaches into the empty space past the last candle. The lagging span is the close plotted 25 bars to the left. The setting is called 26 because the count includes the current bar.
The space between the two leading spans is the cloud. It is shaded green where Span A is above Span B and red where Span B is on top.
A worked example
Suppose that on a daily chart of NSE:NIFTY the last 9 sessions have a highest high of 24,800 and a lowest low of 24,300. The conversion line is (24,800 + 24,300) / 2 = 24,550. If the last 26 sessions run from 23,900 to 24,800, the base line is 24,350. Span A for this bar is (24,550 + 24,350) / 2 = 24,450. It appears on the chart 25 sessions from now, as part of the cloud that future prices will be measured against. These numbers are made up to show the arithmetic.
How to add the Ichimoku Cloud in SuperCharting
- Open a chart, for example NSE:RELIANCE on the 1-day interval.
- Click Indicators in the top toolbar.
- Type "ichimoku" in the search box and click Ichimoku cloud.
- The five lines and the cloud appear on the price chart. To change it, hover over its name in the chart legend and click the Settings gear.
- On the Inputs tab you can change Conversion Line Length, Base Line Length, Leading Span B Length and Lagging Span. The Style tab turns each line and the cloud fill on or off and changes their colours. The Visibility tab chooses the intervals on which it shows.
To reuse a set of indicators, save it as an indicator template.
Choosing the settings
The 9, 26 and 52 defaults date from a time when markets traded six days a week, so 26 was roughly a month. Markets that trade every day, such as BTCUSD, have led some traders to try longer settings such as 20, 60, 120 and 30. Test any change in the Strategy Tester first.
How to read the Ichimoku Cloud
Ichimoku readers look at several things at once, which is why the chart looks busy at first:
- Price against the cloud. A close above the cloud is the main sign of an uptrend; below it, a downtrend. Inside the cloud, the trend is unclear and many traders wait.
- The colour and thickness of the cloud ahead. A green cloud ahead means Span A, the faster span, is above Span B. A thick cloud is a wide zone that price often takes time to cross; a thin one is easier to break.
- Conversion line against base line. The conversion line crossing above the base line is called a TK cross. It is read as stronger when it happens above the cloud, and weaker when it happens below it.
- The base line as support. In a trend, pullbacks often pause near the base line, and some traders trail a stop just beyond it.
- The lagging span. When the lagging span is above the price of 25 bars earlier, the current close is above where price was then, which agrees with an uptrend.
The idea of Ichimoku is that these signs agree before you act on them.
Ichimoku alerts with a short script
The built-in Ichimoku script draws the lines but has no alert conditions of its own. For alerts on a cloud break or a TK cross, save this Pine-compatible script in the Pine Script editor:
//@version=6
indicator("Ichimoku signals", "Ichimoku signals", overlay = true)
convLen = input.int(9, "Conversion Line Length", minval = 1)
baseLen = input.int(26, "Base Line Length", minval = 1)
spanBLen = input.int(52, "Leading Span B Length", minval = 1)
disp = input.int(26, "Lagging Span", minval = 1)
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
conv = donchian(convLen)
base = donchian(baseLen)
spanA = math.avg(conv, base)
spanB = donchian(spanBLen)
// the cloud drawn above this bar was worked out disp - 1 bars ago
cloudTop = math.max(spanA[disp - 1], spanB[disp - 1])
cloudBot = math.min(spanA[disp - 1], spanB[disp - 1])
aboveCloud = close > cloudTop
belowCloud = close < cloudBot
tkUp = ta.crossover(conv, base) and aboveCloud
tkDown = ta.crossunder(conv, base) and belowCloud
plotshape(tkUp, "TK cross up", shape.triangleup, location.belowbar, color.green)
plotshape(tkDown, "TK cross down", shape.triangledown, location.abovebar, color.red)
alertcondition(aboveCloud and not aboveCloud[1], "Close above cloud", "Price closed above the Ichimoku cloud")
alertcondition(belowCloud and not belowCloud[1], "Close below cloud", "Price closed below the Ichimoku cloud")
alertcondition(tkUp, "Bullish TK cross", "Conversion line crossed above the base line with price above the cloud")
alertcondition(tkDown, "Bearish TK cross", "Conversion line crossed below the base line with price below the cloud")
The important line is the one with [disp - 1]. The cloud you see above today's bar was calculated 25 bars ago, so the script compares today's close with the spans from 25 bars back, which are the ones drawn at today's bar.
Add the script from My scripts in the Indicators dialog. Then open the legend's More menu, choose Add alert on …, and pick one of the four conditions. Set Trigger to Once per bar close, so that a break which reverses before the close is not reported. The other alert fields are explained in price alerts.
Where Ichimoku works and where it does not
Ichimoku is built for trends. On a chart that is moving sideways, price keeps entering and leaving a thin cloud and the TK crosses come one after another. It also reacts late, because the base line and Span B look back 26 and 52 bars. Many traders use it on daily and 4-hour charts to decide the direction, then use a shorter interval to time entries. Like any indicator, it describes past prices; past results do not guarantee future results.
The Ichimoku base line is also one of the moving averages behind the technical analysis rating on SuperCharting's symbol pages.
Frequently asked questions
What are the best Ichimoku settings?
The standard 9, 26, 52 and 26 are the most widely used and are the defaults here. Some traders lengthen them for markets that trade seven days a week, but any change should be tested on past data first.
Why does the cloud extend past the last candle?
The two leading spans are drawn 25 bars ahead of the bar that produced them. The part of the cloud to the right of the last candle is already known from current prices.
Does the Ichimoku Cloud repaint?
On closed bars the values stay fixed. On the live bar, the conversion line, base line and the newest part of the cloud can move until the bar closes, which is why alerts set to Once per bar close are the usual choice.
Is the Ichimoku indicator free in SuperCharting?
Yes. It is one of the built-in indicators and is currently free to add to any chart, along with alerts from your own scripts.