Book Image

R Data Visualization Cookbook

Book Image

R Data Visualization Cookbook

Overview of this book

Table of Contents (17 chapters)
R Data Visualization Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Generating a candlestick plot


Candlestick plots have been widely used to display time series data related to financial markets. They are a combination of line charts and bar plots. They look very similar to box plots (discussed later in this chapter), but in reality, they do not share any similarity. A single candlestick is used to display the high, low, opening, and closing prices for a single security for a given time.

The difference between the open and close is shown by the size of the body. The highest and lowest traded prices are indicated by the upper and lower wick respectively. A wick is the straight bar at the top and the bottom of the real body.

Candlestick plots are used for technical analysis of the market. They help in understanding trend. Many a time, technical traders would use candlestick plots to observe and predict reversals in trends. If the size of the candlestick starts getting smaller, it may indicate a dying strategy. They are widely used in financial markets, foreign...