Skip to main content
Skip table of contents

Calculate with time series

The same arithmetic functions are available in MM-Talk for linking time series as for numbers:

+, -, *, /, min, max, exp, log, sin, cos, arctan, <, >, >=, <=, =, <>, and, or, xor etc.

In general, each arithmetic operation is applied to each individual value of the time series in turn (e.g. when adding a constant). If two time series are offset against each other, e.g. added together, the simultaneous values are offset against each other.

Values from one time series for which there are no identical values in the other time series are deleted from the results. For example, if you want to compare the price of a security in different countries and individual values are missing in one of the two time series - e.g. due to a public holiday - the values for these days will also be missing from the results. You should therefore delete such cases manually if necessary to avoid errors in the display.

When calculating several price movements, this can lead to the formula producing an empty time series. For example, the "weighted close" is calculated using the formula "(Close*2+High+Low)/4" ; the three price movements are added together at the same time. If one of the curves in the database is completely missing, the formula returns an empty time series, as all values for which one of the input values is missing are deleted from the result.

In addition to the normal calculation operations, there are also various general functions for time series with which the values of the last N periods can be calculated at any time (e.g."Period maximum", "Turnaround","Breaks","Sum" , etc.). A complete list of all time series functions can be found at MM-Talk reference.

JavaScript errors detected

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

If this problem persists, please contact our support.