Use the New Function tool to create a new add-in function. Fill in the name, category and description of the function as follows:
Name: HISTVOL Return type: CXlOper Category: Statistical Description: Returns the historical volatility of a series of daily prices
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 pricesThe argument's columns should now read as follows:
Name: Prices Type: Double[] 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.