!=
systemic:core-neqLogicInputs
| Name | Type | Description |
|---|---|---|
| First Value | Number series | The first series of numbers to compare. |
| Second Value | Number series | The second series of numbers to compare. |
Outputs
| Name | Type | Description |
|---|---|---|
| NEQ | True/false series | `true` on each bar where the two inputs differ, and `false` where they are equal. |
Cost
0.199 + 0.0055·n credits for n bars, rounded up. The marks are each plan's limit of bars.
The Not Equal module compares two series bar by bar. It returns true where the values differ and false where they match.
| Value A | Value B | A ≠ B |
|---|---|---|
| 100 | 100 | false |
| 100 | 101 | true |
| 50.5 | 50.5 | false |
| -10 | 10 | true |
Missing Data
If either input is empty (null) on a bar, for example a data gap or a closed-market day, the result on that bar is empty. A gap on one side is not a "values changed" signal, and a gap on both sides is not "values match". Both are unknown.
| Value A | Value B | A ≠ B |
|---|---|---|
| 100 | empty | empty |
| empty | 100 | empty |
| empty | empty | empty |
Any two numbers can be compared, so the result is empty only when an input is empty.
Floating-Point Precision
⚠️ Critical: Computed decimal numbers can carry tiny rounding differences that cause unexpected results.
| Expression | Expected | Actual Result |
|---|---|---|
| 0.1 + 0.2 != 0.3 | false | true |
Why? Computers store decimals in binary, which cannot represent every fraction exactly. The value 0.1 + 0.2 is stored as 0.30000000000000004, so it is "not equal" to 0.3.
Implication: NEQ may return true for values that are mathematically equal but were computed in different ways.
Input Alignment
When inputs have different lengths or periods, Systemic matches them by time:
| Scenario | Behavior |
|---|---|
| Different lengths | The result starts at the first bar where both inputs have data |
| Different periods | The series with the longer period repeats its latest value on each bar of the other |
| Constant vs series | The constant is used on every bar |
Practical Example
Change detection: Compare a value with its previous value to find the bars where it changed. NEQ returns true on the bar of the change. A data gap on either side gives an empty result, never a false "changed" signal.
Related Modules
- EQ — Equality comparison (opposite of NEQ)
- GTR / LST — Greater than / Less than comparisons
- NOT — Invert boolean results