n_of

forge.signalsfunctionSince Forge API 1
Signaturepython
forge.signals.n_of(k: int,/,*,name: str | None = None,note: str | None = None,**conditions: np.ndarray | ConditionTree) -> ConditionTree

True on a bar where at least k of the named conditions are true.

Parameters

NameTypeDefault
kint
namestr | NoneNone
notestr | NoneNone
**conditionsnp.ndarray | ConditionTree

Adding a condition does not change the others. The names are kept, so a bar can report which conditions were true. name and note are the group's own, so a condition cannot be called either.