File: WebAPI/rules_1.proto
Logical, arithmetical or function expression. The depth of expression is limited by 10 levels. Only variables of the same domain are allowed within a single expression (e.g., only account variables).
Type: Operand
Description: Left-hand side operand. Zero constant by default. Used only when operator field is specified and ignored otherwise.
Type: Operand
Description: Right-hand side operand. Zero constant by default. Not used for unary operations. Used only when operator field is specified and ignored otherwise.
Type: Operand
Description: List of function arguments. Used only when the function field is specified and ignored otherwise.
Description: Expression type. ADD operator is used if neither operator nor function field is specified.
Type: uint32
Description: Operator of the expression (see left_operand and right_operand fields).
Type: string
Description: Function name for the function expression (see arguments field). Please contact CQG to get the list of supported functions.
Description: List of operators. True is converted to 1 and False is converted to 0 if results of logical expressions are included into the arithmetic operations. Zero is converted to False and Non Zero to True if logical value is expected. Integer and decimal values are implicitly converted to double format. Comparison between double operands is performed with epsilon precision calculated as 2.2204460492503131e-016 * max (1, |operand1|, |operand2|). Condition rule is reset to false (for AUTO rules):
•result of arithmetic operation is infinity or nan,
•required variable does not have a value (e.g., when AccountVariable with TYPE_MIN_DAYS_TILL_POSITION_CONTRACT_EXPIRATION type for an account without open positions),
•in case of any other error on rule calculation.
•OPERATOR_ADD = 0
The result of left_operand + right_operand.
•OPERATOR_SUBTRACT = 1
The result of left_operand - right_operand.
•OPERATOR_MULTIPLY = 2
The result of left_operand * right_operand.
•OPERATOR_DIVIDE = 3
The result of left_operand / right_operand.
•OPERATOR_LESS = 10
True if left_operand is less than right_operand.
•OPERATOR_LESS_EQUAL = 11
True if left_operand is less than or equal to right_operand.
•OPERATOR_EQUAL = 12
True if left_operand is equal to right_operand.
•OPERATOR_NOT_EQUAL = 18
True if left_operand is not equal to right_operand.
•OPERATOR_GREATER_EQUAL = 13
True if left_operand is greater than or equal to right_operand.
•OPERATOR_GREATER = 14
True if left_operand is greater than right_operand.
•OPERATOR_NOT = 15
Inverts True/Non-zero to False and False/Zero to True in left_operand.
•OPERATOR_AND = 16
The result of logical AND operation.
•OPERATOR_OR = 17
The result of logical OR operation.