ta.crossunder
Flag the bar where one series moves down through another.
ta.crossunder(a, b)True on the bar where a falls from at-or-above b to strictly below 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.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
a | Series | number | - | - | The series to read. |
b | Series | number | - | - | The series to read. |
Output
| Name | Type |
|---|---|
value | bool |
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
ta.crossunder(fast, slow)down = ta.crossunder(ta.ema(close, 9), ta.ema(close, 21))
plotshape(down, style=arrowdown, location=abovebar)