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

NameTypeDefault
highArrayLike
lowArrayLike
closeArrayLike
tenkan_periodint9
kijun_periodint26
senkou_b_periodint52

Indicator: Ichimoku Kinko Hyo

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) -> None

Five lines that show trend, momentum and support in one view.

Inputs

NameTypeDefaultRange
tenkan_periodint91 to 500
kijun_periodint261 to 500
senkou_b_periodint521 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.