OHLC stands for open, high, low, close.
A candlestick chart is composed of the body and the shadow. The shadow extending from the top of the body is called the wick, and the shadow extending from the bottom of the body is called the tail.
In order to skip a value, we need to pass in the position of each value in the data array. For our OHLC chart, we have five values: date, opening price, high price, low price, and closing price. The date is in position 1, while the closing price is in position 5. If we want to show the opening price and the closing price separated by a line break, we will format our string as
%2$.2f<br>%5$.2f
.The cursor plugin contains the zoom functionality.
The first option is
fillUpBody
and it needs to be set to true. This will cause all our candlesticks to be colored. Next, we setupBodyColor
anddownBodyColor
to the colors we choose to represent prices that closed higher and lower than the opening price.If there is a stock split, it will be good to represent on the chart. A company buyout or merger will also be relevant. Really, any news that contributes to large movements of the stock will be useful.
The date values for a canvas overlay line need to be converted to an epoch timestamp, which is the number of seconds since January 1, 1970.
Revenue and profit will be the most obvious choices. However, there are many other options. We can graph out our expenses. We can also represent the market share of our competitors to find correlations with our stock price.
Learning jqPlot
By :
Learning jqPlot
By:
Overview of this book
Table of Contents (19 chapters)
Learning jqPlot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Getting Started
More Line Charts, Area Charts, and Scatter Plots
Bar Charts and Digging into Data
Horizontal and Stacked Bar Charts
Pie Charts and Donut Charts
Spice Up Your Charts with Animation, Tooltips, and Highlighting
Stock Market Charts – OHLC and Candlestick Charts
Bubble Charts, Block Plots, and Waterfalls
Showing Real-time Data with Our Charts
Beautifying and Extending Your Charts
Bringing it All Together
Answers
Index
Customer Reviews