AND
systemic:core-andLogicfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| First Flag | booleanarray | The first boolean series for conjunction. |
| Second Flag | booleanarray | The second boolean series for conjunction. |
Outputs
| Name | Type | Description |
|---|---|---|
| AND | booleanarray | The element-wise logical AND result. |
The AND module performs element-wise logical conjunction on two boolean series. The output is true only when both inputs are true.
| A | B | A AND B |
|---|---|---|
| false | false | false |
| false | true | false |
| true | false | false |
| true | true | true |
Missing Data
A flag can be missing (null) — a data gap, or a closed-market slot such as a weekend on a stock series. AND never invents a value for such a slot:
| A | B | A AND B |
|---|---|---|
| false | missing | false |
| missing | false | false |
| true | missing | null |
| missing | true | null |
| missing | missing | null |
A false on either side settles the answer — the output is false no matter what the missing flag would have been. In every other case the result depends on the missing value, so the output is null at that position; the series keeps its full length and alignment.
AND has no invalid inputs, so a null output always means "undeterminable here", never a math error.
In live execution the module returns exactly one datapoint (the newest slot), which is null when that slot is undeterminable.
Numeric Interpretation
⚠️ Important: When inputs are numeric rather than boolean, the AND module converts values before evaluating:
| Value | Interpreted As |
|---|---|
| 0 | false |
| 0.0 | false |
| 1 | true |
| -5 | true |
| 0.001 | true |
Rule: Zero is false. Any non-zero value is true. This applies to both inputs independently.
Input Alignment
When inputs have different lengths or frequencies, Systemic automatically aligns them:
| Scenario | Behavior |
|---|---|
| Different lengths | Shorter series is padded by repeating its last value |
| Different frequencies | Lower-frequency series is upsampled to match |
Example: A daily signal combined with an hourly signal → the daily value is held constant across all hours of that day.
Practical Example
Multi-condition entry: Enter a trade only when RSI indicates oversold and price is above the 200-day moving average. Both conditions must be true simultaneously for the signal to fire—reducing false entries compared to using either condition alone.
Related Modules
- OR — True when either input is true
- NOT — Inverts a boolean series
- EQ — Tests equality between values