Systemicalpha

Equals

systemic:core-eqLogicfunction1 cr

Inputs

NameTypeDescription
First ValuefloatarrayThe first numeric series for comparison.
Second ValuefloatarrayThe second numeric series for comparison.

Outputs

NameTypeDescription
EQbooleanarrayThe element-wise equality result.
Outputi={trueif Ai=Bifalseotherwise\text{Output}_i = \begin{cases} \text{true} & \text{if } A_i = B_i \\ \text{false} & \text{otherwise} \end{cases}

The Equals module compares two numeric series element-wise and outputs true wherever values are identical.

ABA == B
1010true
1011false
5.55.5true
00.001false

Missing Data

If either input is missing (null) at a position — a data gap or a closed-market day — the comparison at that position is null. Two simultaneous gaps are not "equal": null == null is null, never true. The module never invents a comparison result for missing data.

ABA == B
10nullnull
null10null
nullnullnull

Equality itself has no undefined cases: any two present values — including infinities — compare to a real true/false, so missing inputs are the only source of nulls in the output.

In live execution the module returns exactly one datapoint — the newest position — which is null when either input is missing there.


Floating-Point Precision

⚠️ Critical: Floating-point numbers may have tiny precision differences that cause unexpected results.

ExpressionExpectedActual Result
0.1 + 0.2 == 0.3truefalse
1.0000001 == 1.0falsefalse

Why? Computers store decimals in binary, which can't perfectly represent all fractions. The value 0.1 + 0.2 is stored as 0.30000000000000004, not exactly 0.3.

Workaround: For approximate comparisons, subtract the values and check if the absolute difference is below a small threshold (e.g., |A - B| < 0.0001).


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
Constant vs seriesConstant is broadcast to all time points

Practical Example

State detection: Check if RSI exactly equals 50 to detect the neutral zone—though due to floating-point precision, you may prefer using a range check (49.9 < RSI < 50.1) for reliability.


  • NEQ — Not Equal (true when values differ)
  • GTR / LST — Greater than / Less than comparisons
  • GTRE / LSTE — Inclusive comparisons (≥ and ≤)
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5