How to make Candlestick charts in plotly?

How to make Candlestick charts in plotly?

How to make Candlestick charts in plotly?

This recipe helps you make Candlestick charts in plotly


Recipe Objective

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.

Step 1 - Import libraries

import plotly.graph_objects as go import pandas as pd

Step 2 - load Dataset

Sample_data = pd.read_csv("/content/Apple.csv") Sample_data.head()

Step 3 - Plot graph

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'])])

Relevant Projects

Data Science Project on Wine Quality Prediction in R
In this R data science project, we will explore wine dataset to assess red wine quality. The objective of this data science project is to explore which chemical properties will influence the quality of red wines.

Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Build a Music Recommendation Algorithm using KKBox's Dataset
Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.

Human Activity Recognition Using Multiclass Classification in Python
In this human activity recognition project, we use multiclass classification machine learning techniques to analyse fitness dataset from a smartphone tracker.

Predict Churn for a Telecom company using Logistic Regression
Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

Ensemble Machine Learning Project - All State Insurance Claims Severity Prediction
In this ensemble machine learning project, we will predict what kind of claims an insurance company will get. This is implemented in python using ensemble machine learning algorithms.

Predict Employee Computer Access Needs in Python
Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

Topic modelling using Kmeans clustering to group customer reviews
In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

Data Science Project - Instacart Market Basket Analysis
Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

Data Science Project-TalkingData AdTracking Fraud Detection
Machine Learning Project in R-Detect fraudulent click traffic for mobile app ads using R data science programming language.