Crossover & ComparisonPine Script v6

ta.rising()Rising

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

Syntax

Syntax
ta.rising(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 greater 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.rising")
plot(close)
plotchar(ta.rising(close, 3), title="Rising 3", char="▲", location=location.belowbar, size=size.tiny, color=color.lime)

Trading Applications

Confirm uptrend momentum

Filter entries to only rising markets

Validate breakout conditions

Use as a trend strength confirmation

Related Functions

Frequently Asked Questions

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

It compares the current value to the previous length values of the same series. If current is greater than all those prior values (ignoring na), the result is true.

Use it as a filter (e.g., only allow longs when ta.rising(close, n)) or to confirm breakouts when combined with level breaks. Avoid using tiny length on noisy data without additional filters.

Generate ta.rising() Code with AI

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