Lipi Reference Lipi

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 The series doing the crossing.
source2 required series float The series being crossed.

Return Type

series bool

Example


          indicator("Crossunder Example", overlay=true)
fastMA = ta.sma(close, 10)
slowMA = ta.sma(close, 20)
crossunderSignal = ta.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")