官术网_书友最值得收藏!

Using an OHLC chart and a candlestick chart

The OHLC chart and candlestick chart are both designed to show the movement of a stock price over time. OHLC stands for Open, High, Low, and Close. These four stock price values are illustrated for each time unit.

Both components work in exactly the same way, so you can use both the OHLC chart component and the candlestick chart component for this recipe. The only difference between them is the graphical visualization. The following screenshot displays an OHLC chart:

Using an OHLC chart and a candlestick chart

Getting ready

For this recipe, we need some historical stock data. Open your browser and go to http://www.nasdaq.com/ and look for historical quotes on the SAP AG stock as shown in the following screenshot:

Getting ready

Select a timeframe of one month and copy and paste the quotes to the spreadsheet of a new SAP BusinessObjects Dashboards file, as shown in the following screenshot:

Getting ready

How to do it...

  1. First, prepare the data in the spreadsheet. It is now sorted from new to old quotes. As the OHLC Chart component does not enable sorting (see the recipe, Sorting series, later in this chapter) we have to sort the data ourselves in the spreadsheet. Start by selecting all the cells you just pasted into the spreadsheet.
  2. Sort this selection by using the Sort & Filter function in the Editing section of the Home tab of the spreadsheet toolbar. Choose the Sort Oldest to Newest option:
    How to do it...
  3. Add an OHLC Chart component to the canvas.
  4. Enter a chart title and subtitle, or bind these fields to cells in the spreadsheet.
  5. Bind the data By Range to the range of cells that include all values in the Open, High, Low, and Close columns.
  6. Select By Series and enter SAP in the Series Name field.
  7. In the dataset we copied from the NASDAQ website and pasted to the spreadsheet, the dates are in the first column. Bind the Category Labels field to the cells in the Date column:
    How to do it...

How it works...

  • The OHLC chart we just created works as follows: the vertical lines show the price range (from the highest to the lowest value) of a stock for each day. The little mark on the left of these vertical lines indicates the opening price. The little mark on the right indicates the closing price. In addition to this, a line with a set of marks has a dark color if the closing price is lower than the opening price and a light color if the closing price is higher than the opening price as seen in the following screenshot:
    How it works...
  • The candlestick chart shows exactly the same data as the OHLC chart. In the candlestick chart a rectangle is used to illustrate the opening and closing prices. If this rectangle is transparent, the closing price is higher than the opening price, and if it's filled the closing price is lower as seen in the following screenshot:
    How it works...
主站蜘蛛池模板: 旬阳县| 镇宁| 平罗县| 叶城县| 新昌县| 株洲县| 河北区| 山西省| 连江县| 锡林浩特市| 巫溪县| 仁怀市| 藁城市| 丹阳市| 青田县| 调兵山市| 佳木斯市| 双牌县| 福清市| 波密县| 华宁县| 醴陵市| 屯门区| 东乡族自治县| 冕宁县| 临汾市| 梓潼县| 遂昌县| 宜宾市| 石嘴山市| 邵阳市| 玉树县| 庐江县| 射洪县| 班玛县| 平乡县| 张家界市| 华池县| 东丽区| 长泰县| 遂昌县|