cross
forge.tafunctionSince Forge API 1
Signaturepython
forge.ta.cross(a: ArrayLike | float, b: ArrayLike | float) -> np.ndarray1 on a bar where a crosses above b, -1 where it crosses below, 0 elsewhere.
Parameters
| Name | Type |
|---|---|
| a | ArrayLike | float |
| b | ArrayLike | float |
The result is an int8 array, the event form of crossover and crossunder (the two
never hold on one bar). Example: ta.cross(fast, slow).