Flow Control

IfElse

Will return 1 of 2 values based on the input boolean.

  • IfElse(statement, value1, value2)

Return the first value if true or the second value when false.

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

statement

Boolean

True

True, IsTrue, False, IsFalse, Or, Branch, Equals, IsBiggerThan, IsSmallerThan, IsBiggerOrSmallerThan, IsAnyOrderOpen, IsOrderFilled, IsOrderOpen, IsTradeAmountEnough

value1

Dynamic

True

-

value2

Dynamic

True

-

IfElseIf

IfElseIf returns a value based on the boolean inputs.

  • IfElseIf(statement1, statement2, value1, value2, value3)

Return the first value if statement1 is true, return the second value if statement2 is true, or returns value3 when all statements are invalid.

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

statement1

Boolean

True

True, IsTrue, False, IsFalse, Or, Branch, Equals, IsBiggerThan, IsSmallerThan, IsBiggerOrSmallerThan, IsAnyOrderOpen, IsOrderFilled, IsOrderOpen, IsTradeAmountEnough

statement2

Boolean

True

True, IsTrue, False, IsFalse, Or, Branch, Equals, IsBiggerThan, IsSmallerThan, IsBiggerOrSmallerThan, IsAnyOrderOpen, IsOrderFilled, IsOrderOpen, IsTradeAmountEnough

value1

Dynamic

True

-

value2

Dynamic

True

-

value3

Dynamic

True

-

Switch

Will return 1 of 2 values based on the input boolean.

  • Switch(statement, value1, value2)

Return the first value if true or the second value when false.

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

statement

Boolean

True

True, IsTrue, False, IsFalse, Or, Branch, Equals, IsBiggerThan, IsSmallerThan, IsBiggerOrSmallerThan, IsAnyOrderOpen, IsOrderFilled, IsOrderOpen, IsTradeAmountEnough

value1

Dynamic

True

-

value2

Dynamic

True

-