Skip to main content
Skip table of contents

Entering and editing formulas

On the "Formula text" tab, you can enter a new formula or edit an existing formula. To improve readability, all formulas and macros in the formula text are displayed in bold, variables appear in green and comments in blue. Then save the formula; the formula editor is then automatically closed when you save using the "Save" button or the <CTRL>+<S> key combination. When saving using the <CTRL>+<W> key combination, the formula editor remains open.

It is particularly useful to insert comments in the formula text for long formulas. This allows you to find any errors more quickly and make changes easily at a later date. Enclose your comments in curly brackets {}; all characters between the brackets will be ignored during evaluation.

In addition to the function wizard, which you can use to insert existing formulas or macros into the formula text, the formula editor has several other features to make your work easier:

Formula completion

When working with the formula editor, suggestions with available functions are displayed as you type.

If you want to select a suggestion, navigate to it using the arrow buttons and confirm your selection with the <RETURN> button.

Typing function

The Infront Portfolio Manager offers an extensive typing function that makes working with MM-Talk formulas much easier.

  • You can use the <F4> key or the &quot;Type help for function under cursor&quot; icon to display the result object type of the function up to the current cursor position. The initial object type of the formula and, if the formula text is incorrect, a description of the error are also displayed.
    To hide the help text again, click anywhere outside the help window or press the<ESC>key.
  • When you define a new formula, Infront Portfolio Manager automatically determines the object type to which the function is applied based on the context from which the formula editor is opened. This object type is displayed at the top of the "Formula text" tab.
  • The function wizard also offers a typing function. Vwd portfolio manager uses the cursor position to determine the object type to which the new function should be applied. Only the functions that match this object type are then available for selection in the function wizard. Please read the chapter The function assistant.
  • When saving, vwd portfolio manager also checks whether the result of the formula corresponds to the expected object type (e.g. object type "time series" for charts; simple object types such as numbers, character strings etc. for tables). If this is not the case, you will receive a corresponding message.
Direct help for functions and keywords

With the <F2> key or the &quot;Help for function under cursor&quot; icon, you can display a short info text about the formula or macro on which the cursor is currently positioned. This direct help is also available for some keywords.

To hide the help text again, click anywhere outside the help window or press the <ESC> key.

Show parameter list

If you open a round "(" or square "[" bracket after a function when entering a formula, the parameter list for this function is displayed as an aid.

MM-Talk is designed in such a way that not all parameters need to be entered. The default value is then used for unassigned parameters . More on this in the section Setting default values - The parameter dialog.

Display errors in the formula text

If the formula text is incorrect, a corresponding message appears in the status bar on the "Formula text" tab (e.g. "Character string cannot be interpreted"). If the formula text contains several errors, only the first error is displayed.

If you have activated the "Show error" icon, the position of the error is also highlighted in yellow in the formula text.

Help for commenting in and out

The "Comment in/out" command has two functions:

  • If the cursor is on a comment, i.e. a text passage between curly brackets, you can remove these brackets using the EDIT, COMMENT ON/OFF command.
  • To comment a position in the formula text, select the corresponding text with the mouse and select the command EDIT, COMMENT ON/OFF. Curly brackets are placed around the selected text; text between the brackets is ignored when the formula is evaluated.
  • The line in which the cursor of your mouse is currently located can be completely switched off or on again using the EDIT, LINE ON/OFF COMMENT command.
Copy formulas

If the formula text entered is correct, the complete formula, i.e. the formula text together with the default values, the settings for the parameter dialog and the library list, can be copied to the clipboard and pasted into other formulas. For example, you can quickly define several similar assets for asset allocation.

To do this, select the command EDIT, COPY FORMULA and EDIT, PASTE FORMULA.

If you only want to copy the formula text or parts of the formula text, use the "Copy" and "Paste" icons or the keyboard shortcuts <CTRL>+<C> and <CTRL>+<V>.

Character set

If you want to use a different character set in the editor, select the command FORMULA, SETTINGS, FONT TYPE LISTS or FORMULA, SETTINGS, FONT TYPE TEXTS in the main menu. Then make your settings in the "Font" dialog box that appears.

Save current status in the formula editor

In the formula editor, you have the option of saving intermediate statuses without closing the formula editor. To do this, use the key combination <CTRL>+<W> or the command FORMULA, SAVE in the main menu.

The "Save" button, the <CTRL>+<S> key combination or the FORMULA, SAVE AND CLOSE command automatically closes the formula editor after saving.

JavaScript errors detected

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

If this problem persists, please contact our support.