Functions

Conditions

9 names in this group.
Each comes with its signature and an example.

ta.crossover

True on the bar where a crosses above b

signature
crossover(a: Source, b: Source): Cond
example
ta.crossover(fast, slow)

ta.crossunder

True on the bar where a crosses below b

signature
crossunder(a: Source, b: Source): Cond

ta.cross

True on a cross either way

signature
cross(a: Source, b: Source): Cond

ta.rising

Higher than each of the previous length values

signature
rising(src: Source, length: number): Cond

ta.falling

Lower than each of the previous length values

signature
falling(src: Source, length: number): Cond

ta.pivothigh

Pivot high (above both sides): its value on the bar right bars later that confirms it, else NaN

signature
pivothigh(src: Source, left: number, right: number): Series

ta.pivotlow

Pivot low, like pivothigh

signature
pivotlow(src: Source, left: number, right: number): Series

ta.barssince

Bars since the condition was last true

signature
barssince(cond: Bool): Series

ta.valuewhen

src on the bar where cond was true (0 = most recent)

signature
valuewhen(cond: Bool, src: Source, occurrence?: number): Series

npm · GitHub