Skip to content

Equal

Signals · Comparison

Equal node on the canvas

True where |a - b| is within tolerance.

Equal tests whether two series are the same — within a tolerance you set. Because trading values are floating-point (and rarely exactly equal), the tolerance is what makes this block actually usable: it asks "is A within this much of B?" rather than demanding a perfect match that would almost never happen.

How it works

Each bar the block outputs true where |A − B| ≤ Tolerance. With the default Tolerance of 0.0 it requires exact equality — which is appropriate only for integer-like or discrete series (e.g. a regime code). For any real price or indicator comparison, set a tolerance that reflects how close is "close enough" in that series' units. A and B are both series; use a Constant to compare a series against a fixed value.

When to use it

Equal is most useful for discrete or state-coded series — checking whether a Volatility Regime output equals a specific regime code, or whether two indicators have momentarily converged. For continuous prices, "equal within tolerance" can flag touches of a level, but a Between range test or a crossover is usually the better tool. Reach for Equal when you genuinely need a match, not a direction.

Example

Filter to a specific regime: feed a Volatility Regime Regime output into A and a Constant of 3 (expanding) into B with tolerance 0; the true state means "we're in the expanding regime." Combine with a breakout trigger through an And gate into a Buy Signal. Backtest in the Tester.

Tips & gotchas

  • Set a tolerance for real numbers. Exact 0.0 equality almost never fires on prices — it's for discrete codes.
  • Tolerance is in the series' own units — match it to the scale you're comparing.
  • For levels, prefer Between or a crossover; Equal shines on state codes.
  • Both inputs are series — use a Constant for a fixed target.

Inputs

Socket Type What to wire in
A series Left-hand series — the one DOING the crossing. In an MA crossover this is the FAST line (e.g. EMA-20). In an RSI trigger this is the RSI line itself.
B series Right-hand series — the REFERENCE being crossed. In an MA crossover this is the SLOW line (e.g. EMA-50). In an RSI trigger this is the threshold (e.g. constant 30).

Outputs

Output Type Plots as Description
Cond signal Signal arrows Boolean result of the comparison

Parameters

Parameter Type Default What it does
Tolerance number · 0.0–10.0 0.0 Absolute difference allowed before considering a = b

Reference auto-generated from the block catalog · category Signals.