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

IF()

Definition If, then, else. Enables you to construct conditional mathematical expressions.

Syntax images/aspen00000206.gif

Parameters <constant>
An instrument symbol.

<variable>
An instrument variable

<specifier>
An instrument symbol or variable with a specified expiration month.

<delimiter>
A code for a price other than the last price. For more information on delimiters, please read
Value Delimiters.

<operators>
Any one of the comparison operators shown in the function syntax. For more information on operators, please read
Mathematical Operators.

<price>
A price functioning as a basis for comparison.

<value>
A value functioning as a basis for comparison.

<AND>
Optional. Boolean join operator for creating multiple inclusive conditions.

<OR>
Optional. Boolean join operator for creating multiple exclusive conditions.

<value1>
Value if expression(s) is/are true.

<value2>
value if expression(s) is/are false.

Examples ALARM_EVAL=CHART(IF(IBM>94 AND IBM.CLOSE>IBM.PREV,1,0) ,1,2,60,1,3[-1])

alarm trigger condition
IF_EX1==1

color rule
CHART(IF(IBM>94 AND IBM.CLOSE>IBM.PREV,RED,GREEN),1,2,60,1,3[-1])