Crossover & ComparisonPine Script v6

ta.falling()Falling

Tests whether the current source value is strictly lower than each of the prior length non-na values in the lookback window.

Syntax

Syntax
ta.falling(source, length) → series bool

Arguments

ParameterTypeDescription
sourceseries int/floatSeries to evaluate.
lengthseries intNumber of prior bars to compare against.

Returns

true if current source value is less than any previous source value for length bars back, false otherwise.

Remarks

na values in the source series are ignored.

Code Examples

Pine Script v6 Example
//@version=6
indicator("ta.falling")
plot(close)
plotchar(ta.falling(close, 3), title="Falling 3", char="▼", location=location.abovebar, size=size.tiny, color=color.red)

Trading Applications

Confirm downtrend momentum

Filter short entries to falling markets

Validate breakdown conditions

Use as a bearish trend confirmation

Related Functions

Frequently Asked Questions

ta.falling(source, length) returns true when the current bar’s source is lower than the source values over the prior length bars (skipping na), indicating a strictly falling short-term pattern.

ta.rising requires current to exceed all prior length values; ta.falling requires current to be below all prior length values. Both ignore na in the historical window.

Require ta.falling(close, n) or ta.falling(indicator, n) as a bearish momentum filter before short entries, alongside trend, volatility, and risk controls.

Generate ta.falling() Code with AI

Skip the manual coding. Use Pineify's AI Coding Agent to generate Pine Script code using ta.falling() and other built-in functions instantly.