Skip to content

Greater Than

Signals · Comparison

Greater Than node on the canvas

True where a > b.

Greater Than is the basic comparison gate: it outputs true on every bar where series A is above series B, and false otherwise. It's how you turn a raw indicator value into a yes/no trading condition — "is RSI above 50?", "is price above the moving average?", "is ADX above 25?" — that you can then combine with other conditions or feed into an entry.

How it works

Each bar the block evaluates A > B and outputs the boolean result. Unlike Crosses Above (which fires only on the transition bar), Greater Than is a state: it stays true for the entire stretch that A remains above B. A is the value you're testing; B is the reference — wire a Constant for a fixed threshold, or another series for a relative comparison.

When to use it

Use Greater Than as a filter or condition, typically combined with others through an And gate: "ADX > 25 AND price > 200-EMA" builds a regime-and-bias filter. Because it's a continuous state, it's ideal for gating (allowing trades only while a condition holds) rather than triggering (firing an entry). If you want just the bar a condition first becomes true, wrap it in an Edge Trigger.

Example

A trend-bias gate: feed ADX / DMI into A and a Constant of 25 into B; the true state means "a real trend exists." Combine it with your entry trigger through an And gate into a Tester so you only trade when ADX confirms strength. Backtest in the Tester.

Tips & gotchas

  • State, not event. True the whole time A > B — wrap in Edge Trigger for just the first bar.
  • Use a Constant for thresholds; both inputs are series.
  • Great for gating in an And/Or chain; less ideal as a lone entry (it would fire every bar).
  • Mirror is Less Than.

Inputs

Socket Type What to wire in
A series / bars 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. BARS uses close.
B (optional) series / bars Right-hand series — the REFERENCE being crossed. In an MA crossover this is the SLOW line (e.g. EMA-50). BARS uses close. Leave it unwired to compare against the fixed value below.

Outputs

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

Parameters

Parameter Type Default What it does
B number · -1000000.0–1000000.0 0.0 Compared against when the B socket is unwired (e.g. 30 for an RSI trigger).

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