Home/Dovee/Function reference

trendstrength

Trend Strength Index

Reference/Oscillators/Function

trendstrength(source, length)

Pearson correlation of price with time, × 100. Short form `trendstrength(14)` uses close.

Parameters

NameTypeDescription
sourceoptionalseries
default close
Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9).
lengthint
default 14
Lookback in bars. Default 14.

Return value

series

Short form: if the first argument is a number, Dovee uses close as the source.

Example

oscillator
line = trendstrength(14)
plot line as "Trend Strength Index"
level 0 as "Zero" gray

See also