> For the complete documentation index, see [llms.txt](https://vecco-insight.gitbook.io/crash-visualization/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vecco-insight.gitbook.io/crash-visualization/plotly/6.5-financial-charts/6.4.2-candlestick-chart.md).

# 6.4.2 Candlestick Chart

A candlestick pattern is a graphical representation of a movement in the price of a stock or commodity. Studying candlestick patterns is one of the widely used methods of price action trading. Some traders believe that these patterns can predict a particular market movement.

Candlesticks are very similar to box plots. They encompass a body and wicks, also known as shadows.

![](/files/-MD6Zajo3VEWfWARPkLo)

Let's create a customized and modern candlestick chart. As we discussed above, it needs **open, high, low, and close** four-parameter to draw the candle.

```
import plotly.graph_objects as go
import pandas as pd

# load dataset
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')

fig = go.Figure(data=[go.Candlestick(
    x=df['Date'],
    open=df['AAPL.Open'], high=df['AAPL.High'],
    low=df['AAPL.Low'], close=df['AAPL.Close'],
    increasing_line_color= 'deeppink', decreasing_line_color= 'silver'
)])
fig.update_layout(template= 'plotly_dark', title = 'Candlestick Chart')
fig.show()
```

![Candlestick Chart](/files/-MD6_ORZyYsj97nRpjZq)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vecco-insight.gitbook.io/crash-visualization/plotly/6.5-financial-charts/6.4.2-candlestick-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
