Created
August 27, 2021 21:12
-
-
Save SajidLhessani/25fb28278fe0acc09b23d737d3751b01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #declare figure | |
| fig = go.Figure() | |
| #Set up traces | |
| fig.add_trace(go.Candlestick(x=df.index, | |
| open=df['Open'], | |
| high=df['High'], | |
| low=df['Low'], | |
| close=df['Close'], name = 'market data')) | |
| # Add titles | |
| fig.update_layout( | |
| title='Tesla price', | |
| yaxis_title='Stock Price (USD per Shares)') | |
| # X-Axes | |
| fig.update_xaxes( | |
| rangeslider_visible=True, | |
| rangeselector=dict( | |
| buttons=list([ | |
| dict(count=1, label="30m", step="minute", stepmode="backward"), | |
| dict(count=6, label="90m", step="minute", stepmode="backward"), | |
| dict(count=1, label="HTD", step="hour", stepmode="todate"), | |
| dict(step="all") | |
| ]) | |
| ) | |
| ) | |
| #Show | |
| fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment