Ichimoku
Trend and support or resistance: range midpoints at two speeds, plus a cloud drawn from earlier bars.
Ichimoku draws five lines. Tenkan and kijun are midpoints of the highest high and lowest low over 9 and 26 bars by default, not averages of closes. Senkou A averages them, and senkou B is a 52-bar midpoint; the two senkou lines form the cloud. The chikou output is simply the current close.
How to read it
- All five lines sit on the candles. Tenkan is the fast line, kijun the slow one; when tenkan crosses above kijun the short-term range has moved up.
- The cloud is the band between senkou A and senkou B. Price above it reads as uptrend, below as downtrend, inside as balance.
- The cloud is drawn from earlier bars, so it can disagree with the last few candles. It shows where the range was, not where it is now.
- Chikou repeats the close on the same bar, so the classic 'close versus price 26 bars ago' read does not apply here.
What it outputs
- Tenkan
- Midpoint of the highest high and lowest low over the tenkan window. The fastest of the five lines.
- Kijun
- The same midpoint over the slower kijun window. A baseline that price is read against.
- Senkou A
- Halfway between tenkan and kijun, drawn with a lag of displacement minus one bars. One edge of the cloud.
- Senkou B
- Midpoint over the senkou B window, drawn with the same lag. The other edge of the cloud.
- Chikou (close)
- The current close, drawn on the same bar. Not moved back as on textbook charts, so it repeats the candles.
Settings
- tenkan_window
- Bars in the fast midpoint. Raising it smooths tenkan and makes it lag more; lowering it hugs the candles and turns often. Above the senkou B window, the whole indicator goes blank.
- kijun_window
- Bars in the slow midpoint. Raising it gives a slower baseline that moves less; lowering it tracks price closely. Above the senkou B window, the whole indicator goes blank.
- senkou_b_window
- Bars in the longer midpoint that sets the slower cloud edge. Raising it widens the look-back and moves senkou B away from price. It also caps the windows allowed for tenkan and kijun.
- displacement
- How far back the cloud is drawn from its calculation. Raising it makes the cloud lag price by more bars; lowering it brings the cloud close to the current candles.
Pitfalls
- The cloud is shifted by displacement minus one bars, one less than the textbook shift. At default settings a cloud value on a bar was computed 25 bars earlier.
- Defaults are daily-chart settings. On one-minute bars 9, 26 and 52 are under an hour of data, and the cloud lags by about 25 minutes.
- The first 50 bars of data have no values, so the lines start blank. Kijun or tenkan above 52 with the default senkou B window blanks the whole indicator.