Skip to main content

ichimoku

Calculate the Ichimoku Cloud.

Also known as Ichimoku Kinko Hyo, is a versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals. Ichimoku Kinko Hyo translates into "one look equilibrium chart". With one look, chartists can identify the trend and look for potential signals within that trend.

Examples

from openbb import obb
# Get the Ichimoku Cloud.
stock_data = obb.equity.price.historical(symbol='TSLA', start_date='2023-01-01', provider='fmp')
ichimoku_data = obb.technical.ichimoku(data=stock_data.results, conversion=9, base=26, lookahead=False)

Parameters

NameTypeDescriptionDefaultOptional
dataList[Data]List of data to be used for the calculation.False
indexstr, optionalIndex column name to use with data, by default "date".False
conversionPositiveInt, optionalNumber of periods for the conversion line, by default 9.False
basePositiveInt, optionalNumber of periods for the base line, by default 26.False
laggingPositiveInt, optionalNumber of periods for the lagging span, by default 52.False
offsetPositiveInt, optionalNumber of periods for the offset, by default 26.False
lookaheadbool, optionaldrops the Chikou Span Column to prevent potential data leakFalse

Returns

OBBject
results : List[Data]
The calculated data.