XLL+ Class Library

Creating a vector argument

Create a new function

Use the New Function tool to create a new add-in function. In the Add New Function dialog, fill in the name, category and description of the function as follows:

Name:HISTVOL
Category:Statistical
Description:Returns the historical volatility of a series of daily prices

Add a vector argument

In the Function Wizard arguments grid add a new argument Prices, and then click on the vector tool-button, as indicated below.

This will change the argument to a vector. Finally, change the description of Prices to:

Series of daily prices
The argument's columns should now read as follows:

Name:Prices
Type:Double
Dimensions:Vector
Description:Series of daily prices

After you add the argument, the Function Wizard should look like this:

Click on the OK button to dismiss the Wizard and update the source code.

Next: Understanding the vector code >>