Type index

Lipi defines 8 types and 5 enums.

Five names appear in the contract as both a type and an enum. They are enums: the generator that emits the contract names each enum after its value type, so the same object is written into both collections. They are listed once here, under enums.

Types

bool

A true-or-false value. The two constants true and false are the literals for it. Comparisons produce one, and the marker functions take one as their condition. No fields.

chartPoint

A single position on the chart, described by three fields: time carries when, index carries which bar, and price carries where on the price scale. All three fields are series, so a point built on one bar need not hold the same coordinates as one built on the next.

FieldType
timeseries int
indexseries int
priceseries float

color

A colour. You can write one directly as a hex literal — six digits for the colour, eight to carry alpha as well. Seventeen named constants and six functions in the color namespace give you the other ways to get one. No fields.

float

A number with a fractional part, written 1.5. It has no fields. Most market data is float: the bar’s prices, its volume and the averaged prices are all float series.

hline

The value hline gives back once it has drawn a horizontal level. It plays the same part as a plot value in the other fill form: two hline values shade the band between two levels. Mixing one with a plot is not accepted — the two forms of fill are separate. No fields.

int

A whole number. One of the five data types the grammar names directly. Written as a bare number: 14. It has no fields.

plot

The value plot gives back once it has drawn a series. Its use is to be passed on: hold it in a variable and hand two of them to fill to shade the band between the two plots. It exposes no fields of its own.

string

A piece of text, written between double quotes: "length". Titles, messages and instrument details are strings. The str namespace holds the functions that work on them. No fields.

Enums

hlineStyle

Three line styles for a horizontal level: solid, dashed and dotted. The smallest of the five sets, and the only one used by hline. It is not interchangeable with plotStyle.

MemberShown as
hlineStyle.solidSolid
hlineStyle.dashedDashed
hlineStyle.dottedDotted

location

Five places a marker can sit: abovebar, belowbar, top, bottom and absolute. The first two are relative to the bar; top and bottom are relative to the pane; absolute places the mark at a price. It is the location parameter of plotshape and plotchar, and plotarrow has no such parameter at all.

MemberShown as
location.abovebarAbove Bar
location.belowbarBelow Bar
location.topTop
location.bottomBottom
location.absoluteAbsolute

plotStyle

The fourteen ways plot can draw a series: line, linebr, area, areabr, smoothedArea, stepLine, stepLinebr, stepArea, stepAreabr, bar, histogram, scatter, triangular and cross. Name a member with the set in front of it, as in plotStyle.histogram. The br endings are published as members of their own, distinct from the plain forms.

MemberShown as
plotStyle.lineLine
plotStyle.linebrLine Break
plotStyle.areaArea
plotStyle.areabrArea Break
plotStyle.smoothedAreaSmoothed Area
plotStyle.stepLineStep Line
plotStyle.stepLinebrStep Line Break
plotStyle.stepAreaStep Area
plotStyle.stepAreabrStep Area Break
plotStyle.barBar
plotStyle.histogramHistogram
plotStyle.scatterScatter
plotStyle.triangularTriangular
plotStyle.crossCross

shape

The twelve markers plotshape can draw: xcross, cross, triangleup, triangledown, flag, circle, arrowup, arrowdown, labelup, labeldown, square and diamond. Written shape.triangleup and so on. The interpreter records which member you named and leaves the drawing to the chart.

MemberShown as
shape.xcrossXCross
shape.crossCross
shape.triangleupTriangle Up
shape.triangledownTriangle Down
shape.flagFlag
shape.circleCircle
shape.arrowupArrow Up
shape.arrowdownArrow Down
shape.labelupLabel Up
shape.labeldownLabel Down
shape.squareSquare
shape.diamondDiamond

size

Six sizes for a marker: auto, tiny, small, normal, large and huge. Used by the size parameter of plotshape and plotchar. auto is a member like the rest, not the absence of a choice.

MemberShown as
size.autoAuto
size.tinyTiny
size.smallSmall
size.normalNormal
size.largeLarge
size.hugeHuge
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade