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

Embedding Formulas

The program enables you to embed the results of one formula in another formula.

For example, if you have a formula that calculates an expression, i.e.,

CRACK=21*HON2+21*HUN2-CLN2

you can use its formula name in a second formula, i.e.,

MACK=(CLN2*CRACK)+10

where CRACK is the formula shown above. If you embed one formula in another, you use the results of the first formula in the second formula. If you embed a formula that contains instrument variables, you must pass arguments to the formula. For example, the following formulas produce the same values as the examples above:

CRACK=21*$1+21*$2-$3

MACK=($3*CRACK($1,$2,$3))+10

Because these formulas contain instrument variables, you must pass arguments for the instruments when you enter either of these formulas, i.e.,

CRACK(HON2,HUN2,CLN2)

MACK(HON2,HUN2,CLN2)

Embedding also enables you to add a value to itself. For example, the following formula subtracts one variable from another and adds the previous difference to the current difference:

ADVDEC=ADVDEC[1]+$1-$2