Skip to main content
Skip table of contents

Assignment of parameters

For some functions, you can make additional specifications by entering parameters, e.g. for the "GD" function, you can specify the period over which the moving average is to be calculated. These function parameters are placed in square brackets directly after the function. You can find out which parameters a function has at MM-Talk reference.

The parameter list is displayed in the formula editor when you open a square or round bracket after a function.

You can assign variables or constants to function parameters. So that the Infront Portfolio Manager does not return an error message if no value is explicitly assigned to a parameter, default values are stored in the parameters which are used for the calculation in such a case. You can also set such default values for your own macros.

Constants

Constants are fixed parametersthat are usually entered directly in the formula text. For example, to calculate the moving average of a time series over 200 days, the following function is used:

CODE
GD[$Zeitraum; $Methode; $XVersatz; YVersatz] 

The period is described with the constant 200 ; the default values should be used for the other parameters , i.e. they do not need to be assigned. The finished formula is therefore:

CODE
GD[200]
Variables

Variables are placeholders for input values. They always start with a dollar sign($Variable). You can use variables to perform calculations for various input parameters without having to change the formula text. Before executing the formula, simply assign the corresponding value to the variable.

A typical application is, for example, a table in which the same date value is used in several columns and which is to be evaluated one after the other for several different dates. Then assign the same variable name for the date in all columns, e.g."$Evaluation date". If you then set the date in the parameter field, all columns are updated automatically.

Variables can also be very useful when generating signals. You can thus calculate a formula with different variable assignments to find the setting that delivers the best signals.

You can also assign variables with the results of partial expressions and thus increase the evaluation speed. More on this in the sub-expressionssection.

In tables, charts, etc., you can assign variables in the parameter field or in the parameter dialog (see the chapters Tables and Chart analysis). Alternatively, you can also make the assignment in the formula text, in which case the variable assignment must have the following form:

$Variable:=input value

To calculate the moving average over 25 and 200 days, first assign a variable to the parameter . Please note that variables must always begin with a dollar sign($) (i.e. GD[$period]). You can use this formula unchanged for both calculations; in the first case you assign the value 25 to the variable, in the second case the value 200.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.