images/contents.gifimages/index.gifimages/prev1.gifimages/next1.gif

Numeric Variables

A numeric variable is a multiplier, divisor, or factor that is a value produced by a mathematical expression. For example, you can use a function as a numeric variable, as illustrated in the following formula:

images/aspen00000191.gif

In this formula, the number of periods calculated in the simple moving average depends on the value produced by the MDOMCYCLE() function. Lets take a closer look at what happends in this formula:

1. First, the formula finds the corresponding elements of the series,

mdomcycle(IBM.close)

2. Second, the formula calls this value N.

3. Third, the formula evaluates the series,

savg(IBM.close,N)

The element of the secondary expression, savg(IBM.close,N) corresponding to the current bar is the output of the primary expression, mdomcycle(IBM.close) value.