formulas.defineFormula method
formulas.defineFormula is a method of the host object formulas. This method passes a list of arguments that define a formula and specify how the CME is to process the formula for the set of inputs.
The general format for the formulas.defineFormula method
is shown in the following example:
formulas.defineFormula ({argument-list});
Where the statement uses the following syntax:
| Syntax Element | Definition |
|---|---|
| defineFormula | Method of the formulas object that returns a formula definition and adds it to the collection of formulas in the database. |
| {argument-list} | Specifies the list of identifiers and functions and defines the calculation that the formula instructs the CME to perform. |
For examples of how the formulas.defineFormula method is used, see Using CME formula API files.
To create a complete formula, the formulas.defineFormula method requires that a Name identifier, Arguments identifier, Window identifier, and Calculate function are included in each formula definition. For special-case formulas, you can optionally include the Reset and CalculateIntermediate functions. For more information about these items, see the following sections.