Not
The Not node performs element-wise logical inversion on a boolean signal array. Every non-zero value becomes 0 and every zero becomes 1. Null values pass through unchanged as null. It accepts a single input and has no configurable parameters, making it the simplest logic node to use.
Algorithm
- ▸
val !== 0→0 - ▸
val === 0→1 - ▸
nullorundefined→null - ▸The operation is applied to every element independently; the output length always equals the input length.
| Input | Output |
|---|---|
| 1 | 0 |
| 0 | 1 |
| 5 (any non-zero) | 0 |
| null | null |
Parameters
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | (number | null)[] | Boolean signal array to invert. Any non-zero value is treated as true (1). |
| Outputs | ||
| values | (number | null)[] | Inverted signal: 0 where input was non-zero, 1 where input was 0, null where input was null. |
| timestamps | number[] | Bar timestamps (UNIX ms), aligned 1-to-1 with values |
Use Cases
Inverted trend filter
Connect a "price above SMA" Compare signal to Not. The output is 1 while price is below the SMA — use it as a short-only filter by ANDing it with your entry signal.
Block during active conditions
Invert an "overbought" signal and AND it with your long entry signal. Entries are blocked while RSI is overbought — equivalent to an "only enter when not overbought" rule, without needing a separate Compare node.
Complement in boolean algebra
Use Not together with Boolean (AND/OR) to build any complex boolean expression from simpler components — e.g. A AND (NOT B) using one Boolean node and one Not node.