Skip to main content

candle

Show candle plot of loaded ticker.

Source Code: [link]

openbb.stocks.candle(symbol: str, data: Optional[pd.DataFrame] = None, add_trend: bool = False, ma: Optional[Iterable[int]] = None, asset_type: str = "", start_date: Union[datetime.datetime, str, NoneType] = None, interval: int = 1440, end_date: Union[datetime.datetime, str, NoneType] = None, prepost: bool = False, source: str = "YahooFinance", weekly: bool = False, monthly: bool = False, ha: Optional[bool] = False, external_axes: bool = False, raw: bool = False, yscale: str = "linear")

Parameters

NameTypeDescriptionDefaultOptional
symbolstrTicker nameNoneFalse
datapd.DataFrameStock dataframeNoneTrue
add_trendboolFlag to add high and low trends to chartFalseTrue
maTuple[int]Moving averages to add to the candleNoneTrue
asset_typestrString to include in titleTrue
start_datestr or datetimeStart date to get data from with. - datetime or string format (YYYY-MM-DD)NoneTrue
intervalintInterval (in minutes) to get data 1, 5, 15, 30, 60 or 14401440True
end_datestr or datetimeEnd date to get data from with. - datetime or string format (YYYY-MM-DD)NoneTrue
prepostboolPre and After hours dataFalseTrue
sourcestrSource of data extractedYahooFinanceTrue
weeklyboolFlag to get weekly dataFalseTrue
monthlyboolFlag to get monthly dataFalseTrue
haboolFlag to show Heikin Ashi candles.FalseTrue
external_axesboolWhether to return the figure object or not, by default FalseFalseTrue
rawboolFlag to display raw data, by default FalseFalseTrue
yscalestrLinear or log for yscalelinearTrue

Returns

This function does not return anything


Examples

from openbb_terminal.sdk import openbb
openbb.stocks.candle("AAPL")