Systemicalpha

OR

systemic:core-orLogicfunction1 cr

Inputs

NameTypeDescription
First FlagbooleanarrayThe first boolean series for disjunction.
Second FlagbooleanarrayThe second boolean series for disjunction.

Outputs

NameTypeDescription
ORbooleanarrayThe element-wise logical OR result.
A∨B={trueif A=true or B=truefalseif A=false and B=falseA \lor B = \begin{cases} \text{true} & \text{if } A = \text{true or } B = \text{true} \\ \text{false} & \text{if } A = \text{false and } B = \text{false} \end{cases}

The OR module performs element-wise logical disjunction on two boolean series. It returns true if at least one of the inputs is true.

ABA OR B
falsefalsefalse
falsetruetrue
truefalsetrue
truetruetrue

Missing Data

OR uses three-valued logic: a missing (null) input only makes the result null when the outcome genuinely depends on it. One real true decides a disjunction outright, even if the other flag is missing. A false decides nothing on its own — the missing partner could have been true — so the result is null.

ABA OR B
truenulltrue
nulltruetrue
falsenullnull
nullfalsenull
nullnullnull

A missing flag is never treated as false: a gap in your data — a closed market, an indicator warm-up — stays a gap in the signal, at the same position. OR itself has no invalid inputs: every position where both flags are present produces a real true/false.

In LIVE mode the module returns exactly one datapoint — the current bar — which is null when it is undeterminable by the rules above.


Numeric Interpretation

⚠️ Important: When inputs are numeric rather than boolean, the OR module converts values before evaluating:

ValueInterpreted As
0false
0.0false
1true
-5true
0.001true

Rule: Zero is false. Any non-zero value is true. This applies to both inputs independently.


Input Alignment

When inputs have different lengths or frequencies, Systemic automatically aligns them:

ScenarioBehavior
Different lengthsShorter series is padded by repeating its last value
Different frequenciesLower-frequency series is upsampled to match

Practical Example

Multiple entry triggers: Fire a buy signal when either RSI is oversold or MACD crosses above its signal line. This creates a more aggressive strategy that reacts to any bullish indicator, in contrast to AND which requires all conditions.


Comparison: OR vs AND

OperatorBehaviorUse When
ORTrue if any input is trueInclusive criteria, alternatives
ANDTrue only if all inputs are trueStrict filtering, confirmation

  • AND — Logical conjunction (both must be true)
  • NOT — Logical negation (invert a condition)
  • EQ — Equality comparison
  • GTR / LST — Comparison operators for generating boolean conditions
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5