Functions
talib.crossunder()
The mirror of `talib.crossover`: true on the bar where `source1` crosses below `source2`.
Syntax
talib.crossunder(series float source1, series float source2) → series bool
Arguments
source1 required series float First data series source2 required series float Second data series. Return Type
series bool Example
//@lipi=2
indicator("Crossunder Example", overlay=true)
fastMA = talib.sma(close, 10)
slowMA = talib.sma(close, 20)
crossunderSignal = talib.crossunder(fastMA, slowMA)
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
plotshape(crossunderSignal, location=location.abovebar, color=color.red, shape=shape.triangledown, title="Crossunder")