Docs

ta.crossover

Flag the bar where one series moves up through another.

itm
ta.crossover(a, b)

True on the bar where a rises from at-or-below b to strictly above b.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
aSeriesnumber--The series to read.
bSeriesnumber--The series to read.

Output

NameType
valuebool

Warm-up and missing values

Warm-up
2 bars.
Missing values
false while either series is na on this bar or the previous one.

Example

itm
ta.crossover(fast, slow)
itm
up = ta.crossover(ta.ema(close, 9), ta.ema(close, 21))
plotshape(up, style=arrowup, location=belowbar)