Appendix E: XMIM Macro Language

Macros

This appendix is pertinent to users who want to edit or write their own macros.

A macro allows you to store commonly used studies or technical indicators for subsequent use in queries. Macros may have arguments such that the macro can be applied to different securities, for different time periods, etc. Macros are similar to studies in that they provide often-used calculations reduced down to a single statement in the query language. Unlike studies, however, macros exist outside of the program code, and can be created, edited and modified by the user with the Macro Editor.

To edit or create a new macro, open the Macro Editor by selecting Tools>Macro Editor from the XMIM menu bar.

To view existing macros in the Macro Editor, select the Open button and choose the Attribute or Condition macro type. Macros supplied by LIM are listed in the Server Macros pane. Macros created by the user are listed in the Client Macros pane.

Macros supplied by LIM are located in the xmim/library directory within the attr and column sub-directories. A third directory, cond, contains condition macros which return true or false conditions as opposed to numeric values.

Once a macro is created, it is available for use from the Client Studies folder at the bottom of the Studies window.

XMIM supports two types of macros:

  1. ATTR - returns numeric values

  2. COND - returns true or false conditions

Although the XMIM system provides, with the macros facility, the power and flexibility of creating new macros and modifying existing ones, some computer programming knowledge may be required to use this facility depending on the level of complexity involved. If needed, please contact a LIM customer support representative at support@lim.com for assistance.