Home/Dovee/Function reference

replaceMissing

Replace na with a number (default 0).

Reference/Math & comparisons/Function

replaceMissing(series, replacement)

na is not available: the indicator does not have enough bars yet (ema(50) is na for the first 49 bars). replaceMissing fills those gaps so comparisons do not stay false forever. Shorthand: nz(series, replacement).

Parameters

NameTypeDescription
seriesseriesInput that may be na.
replacementoptionalnumber
default 0
Value used when the series is na.

Return value

series

Also accepted: nz.

Example

plot replaceMissing(rsi(14), 50) as "RSI"

See also