N of M¶
Signals · Logic
True when at least N of the wired input signals are true on the bar — 'confluence' / confirmation voting (e.g. '≥3 of these 5 conditions agree'). Generalises AND (N = all) and OR (N = 1).
N-of-M is a confluence voter: wire several signals into it and it fires when at least N of them are true on the bar. It's how you say "I want confirmation, but not perfection" — e.g. "enter when any 3 of these 5 conditions agree" — and it generalises the strict all-must-agree And and the any-one-will-do Or.
How it works¶
Each bar it counts how many of the wired input signals are True and outputs True when that count is at least min_true. Set min_true to the number of votes you require. With min_true = 1 it behaves like Or; with min_true equal to the number of inputs it behaves like And; anywhere in between gives you a tunable confluence threshold. Lookahead-free.
When to use it¶
Use it to build robust, non-brittle entries: instead of demanding every filter line up (rare, few trades) or any single one (noisy), require a majority. It's ideal for combining a basket of confirmations — trend, momentum, volume, structure — where you want most, not all, to agree. Raising min_true trades frequency for selectivity.
Example¶
3-of-5 confluence long: wire trend, momentum, a pullback trigger, a volume filter and a session filter into N-of-M with min_true = 3, then feed the output into the Tester — you enter when the weight of evidence agrees, even if one or two filters disagree.
Tips & gotchas¶
- Generalises And/Or —
min_true = Mis AND,min_true = 1is OR. - Order doesn't matter — it's a count, so all wired signals are equal votes.
- Only signals count — wire boolean conditions, not raw series.
- Raise
min_truefor fewer, higher-quality signals; lower it for more.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Inputs | signal |
Boolean signals to combine |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| Result | signal |
Signal arrows | Combined boolean signal |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| N (min true) | number · 1–100 | 2 |
Minimum number of inputs that must be true. |
Reference auto-generated from the block catalog · category Signals.