How to make Candlestick charts in plotly.
Candlestick charts these are the charts which is a style of financial chart describing open, high, low and close for a given x coordinate. There are boxes which represent the spread between open and close values and the lines represent the spread between low and high values. Sample points where the close value is higher (lower) then the open value are called increasing (decreasing). By default, increasing candles are drawn in green whereas decreasing are drawn in red.
import plotly.graph_objects as go import pandas as pd
Sample_data = pd.read_csv("/content/Apple.csv") Sample_data.head()
fig = go.Figure(data=[go.Candlestick(x=Sample_data['Date'], open=Sample_data['AAPL.Open'], high=Sample_data['AAPL.High'], low=Sample_data['AAPL.Low'], close=Sample_data['AAPL.Close'])]) fig.show()