Divyesh Ashok
Divyesh Ashok

Reputation: 1

Unable to get candlestick patterns in colab

import pandas as pd
import numpy as np
import yfinance as yf
import plotly.graph_objects as go  # For candlestick charting
df=yf.download("TATAPOWER.NS",start = '2012-11-01', end = '2023-12-22', interval = '1wk')
fig = go.Figure(data=[go.Candlestick(
    x=df.index,
    open=df['Open'],
    high=df['High'],
    low=df['Low'],
    close=df['Close']
)])

fig.update_layout(
    title='TATAPOWER Weekly (1990 - 2023)',
    xaxis_title='Date',
    yaxis_title='Price',
    xaxis_rangeslider_visible=False
)

fig.show()

I am trying to get candlestick patterns for a project and colab just provides an empty graph all the time i try using it.
Please suggest to improve and correct.

Not getting candlestick patterns instead a blank graph opens up

Upvotes: 0

Views: 55

Answers (0)

Related Questions