crossunder

forge.tafunctionSince Forge API 1
Signaturepython
forge.ta.crossunder(a: ArrayLike | float,b: ArrayLike | float) -> np.ndarray

True on the bar where a goes from at or above b to below it.

Parameters

NameType
aArrayLike | float
bArrayLike | float

a[i] < b[i] and a[i-1] >= b[i-1], with all four values present; the first bar is false. Either side may be a plain number, but not both. The result is a true or false array. Example: ta.crossunder(fast, slow).