Still have questions?
Contact support

Japanese Candlestick Chart

Overview

The Japanese candlestick chart is a combination of a line chart and a bar chart used primarily to describe price movements of an equity over time, where each bar represents the range of price movement over a given time interval. It is mostly used in technical analysis of equity and currency price patterns.

Candlesticks consist of the body (black or white), an upper and a lower shadow (wick). The wick illustrates the highest and lowest traded prices of a stock, and the body represents the opening and closing trades. If the stock went up, the body is white, with the opening price at the bottom of the body and the closing price at the top. If the stock went down, the body is black, with the opening price at the top and the closing price at the bottom. It's not necessary for a candlestick to have either a body or a wick.

Some traders find candlestick charts easier to read, than Open-High-Low-Close charts.

Japanese Candlestick is a type of series that is predominantly used for demonstrating the stock market data, due to its specifics. So AnyChart Japanese Candlestick series are available in AnyStock. Learn more about using Japanese Candlestick series in Stocks in the Japanese Candlestick series in Stocks article.

This article explains how to create a basic Japanese Candlestick chart as well as configure specific settings. See the table below to get a brief overview of the Japanese Candlestick chart's characteristics:

API
Classanychart.core.cartesian.series.Candlestick
DATA
Data Fieldsopen, high, low, close
Multiple SeriesYES
OPTIONS
StackedN/A
VerticalVertical Japanese Candlestick
3DN/A
Error BarsN/A
SUPPORTED CHART PLOTS
PolarN/A
RadarN/A
ScatterN/A
StockStock Japanese Candlestick
RELATED TYPES
OHLC
SEE ALSO
Chartopedia: Japanese Candlestick Chart
General Settings

Quick Start

To create a Japanese Candlestick chart, use the anychart.financial() chart constructor. If you pass the data to this chart constructor, it will create a Candlestick series.

To create a Candlestick series explicitly, call the candlestick() method.

The following sample demonstrates how a basic single-series Japanese Candlestick chart is created:

// create a data set
var data = anychart.data.set([
[Date.UTC(2007, 08, 07), 22.75, 23.7, 22.69, 23.44],
[Date.UTC(2007, 08, 06), 23.03, 23.15, 22.44, 22.97],
[Date.UTC(2007, 08, 03), 23.2, 23.39, 22.87, 22.92],
[Date.UTC(2007, 08, 02), 22.65, 23.7, 22.65, 23.36],
[Date.UTC(2007, 08, 01), 23.17, 23.4, 22.85, 23.25],
[Date.UTC(2007, 07, 31), 23.88, 23.93, 23.24, 23.25],
[Date.UTC(2007, 07, 30), 23.55, 23.88, 23.38, 23.62],
[Date.UTC(2007, 07, 27), 23.98, 24.49, 23.47, 23.49],
[Date.UTC(2007, 07, 26), 23.2, 23.39, 22.87, 22.92],
[Date.UTC(2007, 07, 25), 22.75, 23.7, 22.69, 23.44],
[Date.UTC(2007, 07, 24), 22.65, 23.7, 22.65, 23.36],
[Date.UTC(2007, 07, 23), 23.55, 23.88, 23.38, 23.62]
]);

// create a chart
chart = anychart.financial();
    
var seriesData = data.mapAs({x: [0], open: [1], high: [2], low: [3], close: [4]});

// create a japanese candlestick series and set the data
var series = chart.candlestick(seriesData);

// set the container id
chart.container("container");

// initiate drawing the chart
chart.draw();

JsFiddle Playground

General Settings

In AnyChart there are many settings that are configured in the same way for all chart types, including the Area chart (for example, legend and interactivity settings).

Read the overview of general settings: General Settings.

Special Settings

Appearance

In this section, we will describe main parts of candlestick chart visualization and ways to adjust it. The visual appearance of candlesticks is defined using certain parameters. The most important parameters for Japanese candlestick series are the following:

You can learn more from the Appearance Settings section.

In the sample below, there are two Japanese Candlestick series with some of the appearance settings configured:

// set colors for the first series
series1.risingStroke("#0066cc");
series1.risingFill("#0066cc", 0.3);
series1.hoverRisingStroke("#0066cc", 2);
series1.hoverRisingFill("#0066cc", 0.1);
series1.selectRisingStroke("#0066cc", 4);
series1.selectRisingFill("#0066cc", 0.5);

series1.fallingStroke("#00cc99", 1, "10 5", "round");
series1.fallingFill("#00cc99", 0.3);
series1.hoverFallingStroke("#00cc99", 2, "10 5", "round");
series1.hoverFallingFill("#00cc99", 0.1);
series1.selectFallingStroke("#00cc99", 4, "10 5", "round");
series1.selectFallingFill("#00cc99", 0.5);

// set hatch for the second series
series2.fallingHatchFill("forwardDiagonal");
series2.risingHatchFill("backwardDiagonal");
series2.hoverFallingHatchFill("diagonalCross");
series2.hoverRisingHatchFill("diagonalCross");
series2.selectFallingHatchFill("percent20");
series2.selectRisingHatchFill("percent20");

JsFiddle Playground

Labels

Labels are text or image elements that can be placed anywhere on any chart (they can be enabled on a whole series or for a single point). For text labels, font settings and text formatters are available.

Tooltips

A Tooltip is a text box displayed when a point on a chart is hovered. There is a number of visual and other settings available: for example, you can edit the text by using font settings and text formatters, change the style of background, adjust the position of a tooltip, and so on.

Candlestick Patterns

In technical analysis, a candlestick pattern is a movement in prices shown graphically on a candlestick chart that some believe can predict a particular market movement. The recognition of the pattern is subjective and programs that are used for charting have to rely on predefined rules to match the pattern. There are 42 recognized patterns that can be split into simple and complex patterns. The sample with the following data demonstrates most popular simple patterns.

PatternDescription
White The close price is lower than the open price, and both are lower that the high price and upper than the low price. The difference between the values is not significant.
BlackThe open price is lower than the close price, and both are lower that the high price and upper than the low price. The difference between the values is not significant.
Long lower shadowThe close price is lower than the open price, and both are lower that the high price and upper than the low price, wherein the difference between the low price and the body is quite higher than between the high price and the body.
Long upper shadowThe open price is lower than the close price, and both are lower that the high price and upper than the low price, wherein the difference between the high price and the body is quite higher than between the low price and the body.
Hammer The open price is lower than the close price, and the close price equals the high price.
Inverted hammerThe close price is lower than the open price, and the close price equals the low price.
Spinning top whiteThis pattern indicates the indecision between the buyers and sellers. If a spinning top forms during an uptrend, this usually means there aren’t many buyers left, if a spinning top forms during a downtrend, this means there aren’t many sellers left. Color of the body is not very important.
Spinning top blackThis pattern indicates the indecision between the buyers and sellers. If a spinning top forms during an uptrend, this usually means there aren’t many buyers left, if a spinning top forms during a downtrend, this means there aren’t many sellers left. Color of the body is not very important.
Four Price DojiAll four prices are equal.
Long legged doji Prices moved above and below the open price, but the close price equals the open price.
Dragonfly dojiThe open price equals the close price and they both are the same as the high price.
Gravestone dojiThe open price equals the close price and they both are the same as the low price.
Marubozu whiteThe open price equals the low price and the close price equals the high price.
Marubozu blackThe open equals the high and the close equals the low.

JsFiddle Playground