Candlestick Chart
Candlestick enables you to create candlesticks over a period of time.
Using Candlestick
To create an Candlestick object, provide its constructor with the [5 x n] array Data, where
- Each element of row 0 represents a time period (e.g.: day)
- Each element of row 1 represents the lowest price during each time period
- Each element of row 2 represents the highest price during each time period
- Each element of row 3 represents the opening price of each time period
- Each element of row 4 represents the closing price of each time period
Take a look at the following example that displays the use of Candlestick:
Use the Update() method to independently modify the following input parameters:
- P – row vector, containing time periods
- Low – row vector, containing lowest price during each time period
- High – row vector, containing the highest price during each time period
- Open – row vector, containing the opening price of each time period
- Close – row vector, containing the closing price of each time period
However, you can only apply the Update() method to an Candlestick object that already exists as shown in the example below:
When changing one or more of the 5 input parameters, make sure they are of same lengths.
Optional Parameters
Next to the mandatory input parameters, there are also a set of optional parameters. We can split those parameters into two categories: Bull and Bear. Every property that has the prefix “Bull” refers to bullish candlesticks while the prefix “Bear” refers to bearish candlesticks:
- bullBodyWidth/ bearBodyWidth specifies the width of the corresponding candlesticks
- bullColor/ bearColor determines the color of the candlestick
However, there are more properties you can specify. They are all listed here.
Further Configurations
Since Candlestick derives from Group, you have access to all configuration options of common group objects.
More Information
Depending on your data, you can pick between several Candlestick overloads:
All overloads are available for the input type float and double.
For more detailed information and examples check out:
The candlestick feature is available since version 4.12 of the ILNumerics Drawing2 module.