Skip to content
Algo Trade Analytics Docs

ta.crossover() - Pine Script Function

The source1-series is defined as having crossed over source2-series if, on the current bar, the value of source1 is greater than the value of source2, and on the previous bar, the value of source1 was less than or equal to the value of source2.

ta.crossover(source1, source2) → series bool
NameTypeDescription
source1series int/floatFirst data series.

true if source1 crossed over source2 otherwise false.