Equals
systemic:core-eqLogicInputs
| Name | Type | Description |
|---|---|---|
| First Value | Number series | The first numeric series to compare. |
| Second Value | Number series | The second numeric series to compare. |
Outputs
| Name | Type | Description |
|---|---|---|
| EQ | True/false series | A true/false series that is true on every bar where the two inputs are equal. |
Cost
0.199 + 0.00528·n credits for n bars, rounded up. The marks are each plan's limit of bars.
The Equals module compares two numeric series bar by bar and outputs true wherever the values are identical.
| A | B | A == B |
|---|---|---|
| 10 | 10 | true |
| 10 | 11 | false |
| 5.5 | 5.5 | true |
| 0 | 0.001 | false |
Missing Data
If either input is empty (null) on a bar, for example a data gap or a closed-market day, the comparison on that bar is empty. Two gaps on the same bar are not "equal": the result is empty, never true. The module never invents a result for missing data.
| A | B | A == B |
|---|---|---|
| 10 | empty | empty |
| empty | 10 | empty |
| empty | empty | empty |
Any two present values compare to true or false, so missing inputs are the only source of empty values in the output.
Floating-Point Precision
⚠️ Important: Decimal numbers can carry tiny rounding differences that cause unexpected results.
| Expression | Expected | Actual Result |
|---|---|---|
| 0.1 + 0.2 == 0.3 | true | false |
| 1.0000001 == 1.0 | false | false |
Why? Computers store decimals in binary, which cannot represent every fraction exactly. The value 0.1 + 0.2 is stored as 0.30000000000000004, not exactly 0.3.
Workaround: For an approximate comparison, subtract the values and check that the absolute difference is below a small threshold (e.g., |A - B| < 0.0001).
Input Alignment
When the inputs have different lengths or periods, Systemic aligns them automatically:
| Scenario | Behavior |
|---|---|
| Different lengths | The result starts at the first bar where both series have data |
| Different periods | The series with the longer period repeats its latest value on every bar of the shorter period |
| Constant vs series | The constant is used on every bar |
Practical Example
State detection: Check if RSI equals 50 to detect the neutral zone. Because of decimal precision, a range check (49.9 < RSI < 50.1) is more reliable.
Related Modules
- NEQ — Not Equal (true when values differ)
- GTR / LST — Greater than / Less than comparisons
- GTRE / LSTE — Inclusive comparisons (≥ and ≤)