count_true
forge.signalsfunctionSince Forge API 1
Signaturepython
forge.signals.count_true(condition: np.ndarray | ConditionTree,bars: int,/) -> np.ndarrayHow many of this bar and the bars - 1 before it the condition was true on, as whole
numbers. A bar with fewer bars behind it counts the bars that exist.
Parameters
| Name | Type |
|---|---|
| condition | np.ndarray | ConditionTree |
| bars | int |