Home/Dovee/Function reference

barssince

Bars since the condition was last true.

Reference/Math & comparisons/Function

barssince(condition)

0 on the bar it fires, then 1, 2, … until it fires again. na until the first true.

Parameters

NameTypeDescription
conditionbooleanA when-style condition or a series.

Return value

series

For developers
  • Pine ta.barssince / MQL5 BarsSince.

Example

plot barssince(rsi(14) is below 30) as "Since OS"

See also