Skip to content
StatePath
Tool Atlaslogic.boolean

Tool

Logic

logic.boolean

LogicBoolean

Inputs

aBoolean

The first true/false signal — for example a trend filter or a crossover trigger.

bBoolean

The second true/false signal (ignored in ‘not’ mode) — for example a momentum or session filter.

Outputs

Boolean

A true/false line carrying the result of the chosen gate, one value per bar.

Logic combines true/false signals with a single gate. It’s the glue for conditions: require both, allow either, demand exactly one, or simply flip a signal — controlled by the mode picker.

Logic overview diagramabANDout0 0 → 00 1 → 01 0 → 01 1 → 1

How it works

Wire one or two boolean inputs (a and b) and choose a mode. ‘and’ is true only when both are true; ‘or’ is true when at least one is; ‘xor’ is true when exactly one is; ‘not’ ignores b and inverts a. The mode picker greys out the second input when you select ‘not’.

Modes

Andand

True only when both a and b are true.

And diagramabANDout0 0 → 00 1 → 01 0 → 01 1 → 1

When to use: Require every condition at once, e.g. trend up AND momentum up before entering.

Oror

True when at least one of a or b is true.

Or diagramabORout0 0 → 00 1 → 11 0 → 11 1 → 1

When to use: Accept any of several setups, e.g. fire on a breakout OR a pullback signal.

Xorxor

True when exactly one of a or b is true, but not both.

Xor diagramabXORout0 0 → 00 1 → 11 0 → 11 1 → 0

When to use: Want a single side active at a time, e.g. long OR short signal but never both together.

Notnot

Inverts a — true becomes false and false becomes true; input b is ignored.

Not diagramaNOTout0 → 11 → 0

When to use: Block on a condition, e.g. enter only when a ‘news window’ flag is NOT set.

Configuration

modeenum

Which logic gate to apply: ‘and’ needs both inputs true, ‘or’ needs at least one, ‘xor’ needs exactly one, and ‘not’ inverts input a (ignoring b).

Choices:andorxornot

Connects to

Reads from
Feeds into

Examples

  • Set mode to and and wire a trend-up flag into a and a momentum-up flag into b to enter only when both agree.
  • Set mode to not and feed a ‘news ceasefire’ flag into a to block entries during scheduled news.

Common mistakes

  • Leaving an unwired b input in or/and mode, so the gate sees a default that quietly changes the result.
  • Reaching for xor when you meant or — xor turns off when both are true, which can silently drop your strongest setups.

See also