Not

UnaryLogic

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 !== 00
  • val === 01
  • null or undefinednull
  • The operation is applied to every element independently; the output length always equals the input length.
InputOutput
10
01
5 (any non-zero)0
nullnull

Parameters

The Not node has no configurable parameters. It accepts a single port connection and produces inverted output immediately.

Inputs & Outputs

PortTypeDescription
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.
timestampsnumber[]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.