talib.cross

True on a bar where source1 and source2 cross, in either direction. When the direction of the cross matters, reach for talib.crossover or talib.crossunder instead.

talib.cross(series float source1, series float source2) → series bool
ParameterTypeRequiredDescription
source1series floatyesFirst series.
source2series floatyesSecond series.

Returns series bool — A series bool flagging the crossing bar.

indicator("Close crosses the open")
plotshape(talib.cross(close, open), title = "Cross")

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade