Skip to content

BinaryComparison

QuantConnect.BinaryComparison

Bases: Object

Enumeration class defining binary comparisons and providing access to expressions and functions capable of evaluating a particular comparison for any type. If a particular type does not implement a binary comparison than an exception will be thrown.

EQUAL

EQUAL: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.Equal

NOT_EQUAL

NOT_EQUAL: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.NotEqual

LESS_THAN

LESS_THAN: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.LessThan

GREATER_THAN

GREATER_THAN: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.GreaterThan

LESS_THAN_OR_EQUAL

LESS_THAN_OR_EQUAL: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.LessThanOrEqual

GREATER_THAN_OR_EQUAL

GREATER_THAN_OR_EQUAL: BinaryComparison = ...

Gets the BinaryComparison equivalent of ExpressionType.GreaterThanOrEqual

type

type: Any

Gets the expression type defining the binary comparison.

flip_operands

flip_operands() -> BinaryComparison

Flips the logic ordering of the comparison's operands. For example, LESS_THAN is converted into GREATER_THAN

from_expression_type

from_expression_type(type: Any) -> BinaryComparison

Gets the BinaryComparison matching the provided type

to_string

to_string() -> str

Returns a string that represents the current object.

Returns:

Type Description
str

A string that represents the current object.