Casts a value to the linefill type, mainly so that na can be given a linefill type.
linefill(na) is a linefill-typed na, the starting value a variable needs before it holds a real fill. An existing linefill passes through unchanged.
The declaration linefill f = na does the same in most scripts.
Syntax
linefill(x: series linefill) -> series linefillArguments
| Name | Type | Default | Description |
|---|---|---|---|
| x | series linefill | required | The value to convert to a linefill. Passing na gives a typed na; an existing linefill comes back unchanged. |
Returns
series linefill: The argument, typed as a linefill.
Example
//@version=6
indicator("linefill cast: typed na", overlay = true)
var f = linefill(na)
plot(na(f) ? 1 : 0, "No fill yet")See also
Runs on Sidechair