How it is calculated
Conversion and base are the midpoint of the highest high and lowest low over their lengths, span A their mean, span B the midpoint over the longest window, the lagging line the close. Each value at a bar comes from bars up to it; the chart only draws the spans displacement bars ahead and the lagging line as far back. The conversion line starts first, base and spans once their windows are full.
Reference: Hosoda (Ichimoku Kinko Hyo)
How to read it
Price above the cloud is read as an uptrend, below it as a downtrend, inside it as undecided. Conversion crossing base is a short term signal, and a thick cloud is stronger support or resistance than a thin one. With so many lines it lags, and in ranges it says little.
In a strategy
A strategy reads unshifted values: ctx.ind("ichimoku").span_a now is what the chart draws displacement bars ahead. To test price against the cloud under the current bar, keep the spans of the last displacement bars and use the oldest; .conversion over .base is a simple trigger.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Conversion line lengthconversion | Whole number | 9 | min 1, max 5000 |
Base line lengthbase | Whole number | 26 | min 1, max 5000 |
Span B lengthspan_b | Whole number | 52 | min 1, max 5000 |
Displacementdisplacement | Whole number | 26 | min 1, max 500 |
What it draws
| Line | Drawn as |
|---|---|
| Conversion | Line |
| Base | Line |
| Span A | Line |
| Span B | Line |
| Lagging | Line |
Used in
No strategy template reads it yet.