Lipi Reference Lipi

Functions

talib.crossunder()

The source1-series is defined as having crossed under source2-series if, on the current bar, the value of source1 is less than the value of source2, and on the previous bar, the value of source1 was greater than or equal to the value of 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


          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")