ichimoku
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.ichimoku(high: ArrayLike,low: ArrayLike,close: ArrayLike,tenkan_period: int = 9,kijun_period: int = 26,senkou_b_period: int = 52) -> dict[str, np.ndarray]Tenkan, kijun, senkou A and B, and chikou, undisplaced.
Parameters
| Name | Type | Default |
|---|---|---|
| high | ArrayLike | |
| low | ArrayLike | |
| close | ArrayLike | |
| tenkan_period | int | 9 |
| kijun_period | int | 26 |
| senkou_b_period | int | 52 |
tenkan and kijun are the midpoints of the highest high and lowest low over their
periods, senkou_a is their mean, senkou_b the midpoint over senkou_b_period and
chikou is the close. NaN for a window that is not yet full or holds a missing value.
Classpython
forge.ta.Ichimoku(**inputs: Any) -> NoneFive lines that show trend, momentum and support in one view.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| tenkan_period | int | 9 | 1 to 500 |
| kijun_period | int | 26 | 1 to 500 |
| senkou_b_period | int | 52 | 1 to 500 |
mid(n) = (highest high + lowest low over the last n bars) / 2
Tenkan = mid(tenkan_period), Kijun = mid(kijun_period)
Senkou A = (Tenkan + Kijun) / 2, Senkou B = mid(senkou_b_period)
Chikou = the close
The values are not displaced. The chart draws the two spans kijun_period bars ahead and Chikou kijun_period bars back; strategies read the values as they are.