Base logic
Understand Origami Tech’s base logic structure used to build dynamic, rule-based trading strategies with logical conditions and data processing functions.
Boolean operators
()
()Breakets can be used to combine expressions
x if smth else y
x if smth else yConditional operator.
Returns x if smth is True
Returns y if smth is False
x, y, smth - can be decimal, function call, custom formula, math expr or bool
<x> or <y>
<x> or <y>Boolean operator or. Returns bool
Any non-zero value for operands casts as True (ex: 1 → True, 0 → False)
Truth table:
True
True
True
True
False
True
False
True
True
False
False
False
<x> and <y>
<x> and <y>Boolean operator and. Returns bool
Any non-zero value for operands casts as True (ex: 1 → True, 0 → False)
Truth table:
True
True
True
True
False
False
False
True
False
False
False
False
<x> == <y>
<x> == <y>Equivalent op. Returns bool
Truth table:
1
1
True
0
1
False
1
0
False
`<x>
`<x>Boolean operator and. Returns bool
Truth table:
1
1
False
1
0
True
0
1
True
<x> > <y>
<x> > <y>#v1 #v2
Boolean operator greater. Returns bool
Truth table:
1
0
True
0
1
False
1
1
False
<x> >= <y>
<x> >= <y>#v1 #v2
Boolean operator greater or equivalent. Returns bool
Truth table:
1
0
True
0
1
False
1
1
True
<x> < <y>
<x> < <y>#v1 #v2
Boolean operator less. Returns bool
Truth table:
1
0
False
0
1
True
1
1
False
<x> <= <y>
<x> <= <y>#v1 #v2
Boolean operator less or equivalent. Returns bool
Truth table:
1
0
False
0
1
True
1
1
True
Math operators
()
()Breakets can be used to combine expressions
<x> / <y>
<x> / <y>Division operator. Returns decimal
<x> * <y>
<x> * <y>Multiplication operator. Returns decimal
<x> + <y>
<x> + <y>Sum operator. Returns decimal
<x> - <y>
<x> - <y>Subtraction operator. Returns decimal
<x> ** <y>
<x> ** <y>Exponentiation operator. Returns decimal
<x> ^ <y>
<x> ^ <y>Last updated