Skip to content
StatePath
Tool Atlascondition.compare

Tool

Compare

condition.compare

ConditionCompare

Inputs

aBuffer (time series)

The first operand — usually the number line you are testing: an oscillator, an indicator reading, or a computed series. Can also be a fixed literal or a module input.

bBuffer (time series)

The second operand — the level or series to compare against. Type a fixed number for a classic threshold, or wire another series for a series-vs-series comparison.

cBuffer (time series)

The third operand — appears when operand_count ≥ 3. With mode ≤, a ≤ b ≤ c makes b's position inside the [a, c] band a single node.

dBuffer (time series)

The fourth operand — appears when operand_count ≥ 4; the chain adds the c-to-d comparison.

eBuffer (time series)

The fifth operand — appears when operand_count = 5; the chain adds the d-to-e comparison.

Outputs

Boolean

A boolean that is true on each bar where every adjacent comparison in the chain holds, and false otherwise — including every bar where a compared value is NaN.

Compare is the one gate for every numeric comparison: pick an operator (>, ≥, <, ≤, =, ≠) and it fires true on each bar where the comparison holds. Chain up to five operands and it reads like math — a < b < c means “b sits inside the band”.

Compare overview diagram

How it works

Wire a number line into `a` and give it something to compare against — type a fixed level into `b`, bind it to a module input, or wire a second series. The mode picker chooses the operator; with operand_count above 2 the node checks every adjacent pair (a < b, then b < c, …) and outputs true only when ALL of them hold. Equality modes (=, ≠) compare within the epsilon tolerance. A bar where any compared value is NaN never fires — warmup bars can't sneak through a gate.

Modes

Mode options

Greater than (>)gt

True where the left operand is strictly above the right one.

Greater than (>) diagram

When to use: The classic strength gate — RSI > 60, ADX > 25, volume ratio > 1.5.

Greater or equal (≥)ge

True where the left operand is above or exactly at the right one.

Greater or equal (≥) diagram

When to use: Like >, but the boundary bar itself also fires — use when hitting the level counts.

Less than (<)lt

True where the left operand is strictly below the right one.

Less than (<) diagram

When to use: The oversold / quiet-market gate — RSI < 30, ADX < 20, spread < a cap.

Less or equal (≤)le

True where the left operand is below or exactly at the right one.

Less or equal (≤) diagram

When to use: Like <, with the boundary included. With 3 operands, a ≤ b ≤ c is an inclusive range check.

Equal (=)eq

True where the two operands differ by no more than epsilon.

Equal (=) diagram

When to use: Match a computed level or index — keep a small epsilon so float noise doesn't break the match.

Not equal (≠)ne

True where the two operands differ by more than epsilon; NaN never counts as different.

Not equal (≠) diagram

When to use: The nonzero test: ≠ against a fixed 0 turns any number line into a true/false line.

Operand count options

22
33
44
55

Configuration

modeenum

The comparison operator applied to each adjacent operand pair: gt (>), ge (≥), lt (<), le (≤), eq (= within epsilon), ne (≠ outside epsilon).

Choices:gtgeltleeqne
operand_countenum

How many operand slots are live, from 2 to 5. The node chains the comparison across every adjacent pair — with 3 operands and mode ≤, a ≤ b ≤ c is a one-node range check; hidden slots are ignored even if wired.

Choices:2345
operand_count diagram3/5
epsilonscalar

Tolerance for the equality modes: = fires when the pair differs by no more than epsilon, ≠ when it differs by more. Keep a tiny positive value to compare floats safely; 0 makes ≠ an exact nonzero test.

epsilon diagram

Connects to

Reads from
Feeds into

Examples

  • Overbought gate: wire RSI into a, type 70 into b, mode gt — fires only while momentum is stretched.
  • Range check: mode le with operand_count 3 — type 40 into a, wire RSI into b, type 60 into c to pass only while RSI sits in the 40–60 band.
  • Nonzero cast: mode ne with b = 0 and epsilon 0 turns any numeric series into a clean true/false line.

Common mistakes

  • Expecting > to fire when the value exactly equals the level — the strict modes exclude the boundary; use ≥ / ≤ when the exact touch should count.
  • Using ≠ with a large epsilon and reading it as “not exactly equal” — ≠ fires only when the pair differs by MORE than epsilon.
  • Chaining 3+ operands and expecting every pair to be compared — only ADJACENT pairs are tested (a vs b, b vs c), never a vs c.

See also