Interactive Candlestick Charting with Xcelsius

Do you need to display stock information in an interactive SAP BusinessObjects Dashboard model? This post shows how to do just that. With as little as two components – the Candlestick Chart and a List Box – you can create and deliver an hour-by-hour and interactive display of stock performance for a selected day.

Download the full-screen version, XLF file, and sample data at the bottom of the post.

It’s customary for stock data to come in a very consistent format. This is good news for Xcelsius and Dashboard designers. Data can be inserted, linked, connected, and bound to your visual components with relative simplicity. Stock data is traditionally available with the following columns:

  • Date
  • Time
  • Open
  • High
  • Low
  • Close

In this post, we’ll create a dashboard by taking the following steps:

  • Populate a List Box with trade dates
  • Use the values in the Time column as our Horizontal Axis Labels (or Category Labels)
  • Chart the values for Open, High, Low, and Close

Stock and commodity trading specialists can analyze the patterns created by a Candlestick chart to make crucial decisions about which products to buy/sell and when to buy/sell them. Patterns in a Candlestick chart can illustrate bullish and bearish trends, trend reversals, indecision of traders, complex stick patterns, and much more. Day traders and long-haul investors alike can employ the centuries old practice of Japanese Candlestick Charting and interpret data patterns in Xcelsius to identify marubozu trends, spinning tops, doji patterns, paper umbrellas, hammers, shooting stars, and many more. And it can all be done within an easy to customize Xcelsius dashboard!

Insert Data

Let’s begin by launching Xcelsius then inserting a spreadsheet with 4,956 rows of trade data.

Note:
To use all 4,956 rows, you must increase the maximum number of rows in your instance of Xcelsius. This is done by clicking File -> Preferences, then selecting Excel Options in the list of Preferences. From here you can manually adjust the Maximum Number of Rows from the default of 512 to a much greater number. (Use caution when increasing the limit to beyond 5,000 rows).

The screenshot below shows the Maximum Number of Rows being increased to 5120 from 512.

Increase Maximum Number of Rows

Once the data has been inserted, locate the Candlestick Chart component and List Box then drag them to the report canvas. (Use the Combo Box if you prefer to use it rather than the List Box). Position the components the way you prefer and add a background object or two layered behind the primary components.

Populate the List Box First

  • Select the List Box
  • Bind the labels to the entire DATE column. (All 4,956 rows)
  • Change the Insertion Type to Filtered Rows
  • Source Data: Select the entire block of data – (A12:F4967) as Source Data
  • Destination: Select a range that will hold all the values of a unique date (and a few extra rows – just in case). In my example, I set the Destination to (I12:N106).

The steps above allow you to grab all the values for a selected date and pass them to the I12:N106 range. We can then bind the Candlestick Chart to these values, allowing the chart to change every time a new date is selected.

Bind the Chart to the Destination Cells of the List Box

  • Begin by Selecting the Candlestick Chart
  • In the Properties tab, click the By Series option under Data
  • Bind the Series Name to the first date value. (In this example, it’s I12)
  • Bind the Open values to the column of Open data. (Column K)
  • Bind the High values to the column of High data. (Column L)
  • Bind the Low values to the column of Low data. (Column M)
  • Bind the Close values to the column of Close data. (Column N)

Tip: My personal preference is to delete the chart title and subtitle then add Text Labels to the canvas and bind to dynamic titles and subtitles or enter static title values.

The screenshot below shows the Candlestick Chart bindings to the dynamic values in the spreadsheet.

Binding Rows of Data to the Candlestick Chart

Preview Your Dashboard

Run it, test it, scroll through the dates, and watch the chart change. Once you see the chart in action, you’ll begin to get an idea of how you’d like to modify the colors and how you’d like to modify the layout of your components.

Below are the files used to create this example. Included are: Sample data, XLF model, and SWF file.

Candlestick Charting

Please let me know if you have any questions.
Thank you,
Jim Brogden – jim.brogden@daugherty.com

Population Pyramids using Xcelsius

Population pyramids aren’t just for Excel anymore. In just a few minutes, you can have a great looking Xcelsius chart that isn’t commonly seen in Xcelsius.

 

Continue reading →

Xcelsius Thermometer Chart

In just a few quick and easy steps, you can generate a thermometer chart with out of the box Xcelsius functionality.
Here is how it looks all together with a line chart to toggle the goal line.

Continue reading →

Creating a Custom Theme in Xcelsius

For the past year as I have transitioned from creating dashboards in Excel to utilizing Xcelsius, I have been forced to regress on some of my previous charting advances. Spurred on by the teachings of Edward Tufte and Stephen Few, and the implementation of their ideas by BonaVista Systems and Juice Analytics, I was determined to make great “clean” dashboards.

Continue reading →

Adding Regression Trends to a Dashboard

Do you need to display the Linear Regression or Logorithmic Regression of data trends in an Xcelsius dashboard but don’t know how to write the required formulas? If so, you’ll be extremely pleased to know how easily these regression types can be created in Xcelsius. And all without having to figure out which formula to use, how to get the syntax perfect, or which values should be plugged into which variables. Just bind the component to two rows (data source and destination cells) in your spreadsheed and it’s done!

By using the Trend Analyzer component, you’ll be able to add up to five different types of regression trends to your dashboards – in seconds. This post will walk you through the steps of adding regression trends to a dashboard and discuss several other details of the component.

To save time, I’ll add the Trend Analyzer component to an existing Xcelsius model before describing the features, functionality, and properties. The screenshot below shows how to locate it in the component browser as it appears in the Other category.

* One thing to note about this component is that it’s not visible during runtime. You don’t have to worry with moving it to a bottom layer in your dashboard because it can only been seen while in development.

Selecting the Trend Analyzer Component

 

Modifying the Trend Analyzer Properties

Once you’ve added the Trend Analyzer component to your dashboard canvas, select the component to view it’s properties. The properties are separated into three sections and pictured in the screenshot below.

  • Data
  • Trend/Regression Type
  • Insertion Options

Trend Analyzer Properties

Properties: Step by Step

1. Data: The Data section is very important because this is where you will map (or bind) to the data that will be converted to the specified regression type. Just click the standard mapping icon to select the data to be analyzed. See screenshot below.

Bind to the Data to be Evaluated

2. Trend/Regression Type: Here you have the option of selecting either Use Best Fit or Select a Type. The default selection is Select a Type and the default selection type is Linear. The available selection types are:

  • Linear
  • Logorithmic
  • Polynomial
  • Power
  • Exponential

3. Analyzed Data Destination: Here is where you’ll map to a blank area in your spreadsheet that’ll be used to store the analyzed data fed in from the Data section. Be sure to color-code and label your Analyzed Data Destination cells or it will be difficult (if not impossible) to locate them later.

More Options
Additionally, you can click the underlined supplemental section called More Options to display a list of advanced or formula specific values. Use this section to add addional labeling to your dashboard if the formula values are important to your users.

These options include the following:

  • Equation Type Destination
  • Equation Destination
  • R2 Value Destination
  • F Value Destination

These properties are pictured below.

Additional Trend Analyzer Display Options

 

Putting the Trend Analyzer Component Into Action

It’s time to bind our component to some data values and see what it can do.

  • Step 1: Bind to data. I selected cells C2:H2 as the data source for the component.
  • Step 2: Select a Regression Type. I selected Use Best Fit.
  • Step 3: Define your Analyzed Data Destination. This step is used to bind to blank rows in your spreadsheet. It’s important to note that the number of cells selected in this step should match the number of cell selected in Step 1. I selected cells C1:H1.
  • Step 4: Highlight and label your destination cells. In this example, cells C1:H1.

To see the regression value displayed, add a new series to a chart then bind to cells C1:H1.

Trend Analyer Properties - Bound to Cells

 

Displaying the Variables
 
Follow these steps to display the variables used in creating the regression.

  • Step 1: Expand the More Options label
  • Step 2: Bind to a single blank cell in your spreadsheet for each of the four options
  • Step 3: Color code and label your spreadsheet
  • Step 4: Add Label components to your dashboard canvas and map to the cells used in Step 2.

Trend Analyzer Options - Bound to Cells

Putting it All Together

The next screenshot shows how a Regression series can be added to a chart and trend details displayed at the bottom of the screen. The drop-down was added to show that Trend/Regression values can be calculated dynamically and modified by other components in the dashboard. This simple example passes the Combo Box selection to a cell in the spreadsheet and VLOOKUP formulas are used in cells C2:H2 to determine the value to be charted. The formulas in cell C2:H2 are listed below.

  • C2 =VLOOKUP($B$2,$A$19:$O$22,3,FALSE)
  • D2 =VLOOKUP($B$2,$A$19:$O$22,4,FALSE)
  • E2 =VLOOKUP($B$2,$A$19:$O$22,5,FALSE)
  • F2 =VLOOKUP($B$2,$A$19:$O$22,6,FALSE)
  • G2 =VLOOKUP($B$2,$A$19:$O$22,7,FALSE)
  • H2 =VLOOKUP($B$2,$A$19:$O$22,8,FALSE)

If you recall, step 1 above (in Putting the Trend Analyzer Component Into Action), C2:H2 is the data source for our Trend Analyzer component. This means that the values in C1:H1 will always change when the contents of B2 is changed. Not coincidentally, cell B2 is the destination cell of my Combo Box.

Below is a screenshot of a simple dashboard using Trend Regression and displaying trend details.

Trend/Regression Used in Dynamic Xcelsius Chart and Dashboard

Please feel free to contact me with any questions.

See the dashboard in action: Interactive and Dynamic Regression Trending with Details

Download the XLF file: Regression Trending XLF

Thank you,
Jim Brogden
jim.brogden@daugherty.com