Skip to content
ChartDeck ChartScript docs Account Open the terminal

linefill

Fills between two lines.

#Functions

#linefill.deletefunction

Removes the fill.

linefill.delete(id: linefill)
ParameterTypeDescription
idlinefillThe array.

Example

ChartScriptFragmentOpen in editor
const a = line.new(bar_index - 5, high, bar_index, high)
const b = line.new(bar_index - 5, low, bar_index, low)
const f = linefill.new(a, b, color.blue)
f.delete()

Since ChartScript 1

#linefill.get_line1function

The first line.

linefill.get_line1(id: linefill): line
ParameterTypeDescription
idlinefillThe array.

Returns line.

Example

ChartScriptFragmentOpen in editor
const a = line.new(bar_index - 5, high, bar_index, high)
const b = line.new(bar_index - 5, low, bar_index, low)
const f = linefill.new(a, b, color.blue)
const l1 = f.get_line1()

Since ChartScript 1

#linefill.get_line2function

The second line.

linefill.get_line2(id: linefill): line
ParameterTypeDescription
idlinefillThe array.

Returns line.

Example

ChartScriptFragmentOpen in editor
const a = line.new(bar_index - 5, high, bar_index, high)
const b = line.new(bar_index - 5, low, bar_index, low)
const f = linefill.new(a, b, color.blue)
const l2 = f.get_line2()

Since ChartScript 1

#linefill.newfunction

Fills the space between two lines (it goes when either line goes).

linefill.new(line1: line, line2: line, color: color): linefill
ParameterTypeDescription
line1lineThe line1.
line2lineThe line2.
colorcolorThe colour.

Returns linefill.

Example

ChartScriptFragmentOpen in editor
const a = line.new(bar_index - 5, high, bar_index, high)
const b = line.new(bar_index - 5, low, bar_index, low)
const f = linefill.new(a, b, color.new(color.blue, 80))

Since ChartScript 1

#linefill.set_colorfunction

Sets the colour.

linefill.set_color(id: linefill, color: color)
ParameterTypeDescription
idlinefillThe array.
colorcolorThe colour.

Example

ChartScriptFragmentOpen in editor
const a = line.new(bar_index - 5, high, bar_index, high)
const b = line.new(bar_index - 5, low, bar_index, low)
const f = linefill.new(a, b, color.blue)
f.set_color(color.red)

Since ChartScript 1

#Variables

#linefill.allvariable

Every line fill of the script that still exists.

linefill.all: array<linefill>

Type series array<linefill>.

Example

ChartScriptFragmentOpen in editor
const n = array.size(linefill.all)

Since ChartScript 1

The ChartScript documentation is in English for now; translations will follow.