Skip to main content

candle

Show candle plot of loaded ticker.

Source Code: [link]

openbb.etf.candle(symbol: str, data: pd.DataFrame = None, use_matplotlib: bool = True, intraday: bool = False, 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, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, yscale: str = "linear")

Parameters

NameTypeDescriptionDefaultOptional
symbolstrTicker nameNoneFalse
datapd.DataFrameStock dataframeNoneTrue
use_matplotlibboolFlag to use matplotlib instead of interactive plotly chartTrueTrue
intradayboolFlag for intraday data for plotly range breaksFalseTrue
add_trendboolFlag to add high and low trends to chartFalseTrue
maTuple[int]Moving averages to add to the candleNoneTrue
assettypestrString to include in titleNoneTrue
external_axesOptional[List[plt.Axes]]External axes (2 axes are expected in the list), by default NoneNoneTrue
assettypestrString to include in titleNoneTrue
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
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")