Docs

ITMScript · Reference

Colours and styles

The names a study may use for colour, plot style, marker style and line style, and the other spellings the language accepts.

Colours

Write a colour as color.blue, as #rrggbb or as #rrggbbaa. The swatch is the reference value color.new uses to make a see-through colour, such as color.new(color.blue, 80). The chart paints a named colour from its own light or dark palette, so the shade on a chart follows the theme.

A per-bar colour goes on plot, plotshape, fill and bgcolor. The colour of each may be a condition that picks between two colours, one for each outcome. A level's colour is one colour for the whole study. bgcolor tints by condition as before.

  • color.blue#2962ff
  • color.green#26a69a
  • color.orange#ff9800
  • color.purple#9c27b0
  • color.red#ef5350
  • color.cyan#00bcd4
  • color.yellow#ffeb3b
  • color.pink#e91e63
  • color.white#ffffff
  • color.gray#787b86
  • color.black#000000
  • color.lime#00e676
  • color.teal#009688
  • color.maroon#80323c
  • color.navy#00227b
  • color.olive#808000
  • color.silver#b2b5be
  • color.aqua#00bcd4
  • color.fuchsia#e040fb

Plot styles

The chart draws a few styles in the nearest shape it has, so each row says what you see.

The style option of plot. The width is a whole number from 1 to 8.

StyleDraws
lineA continuous line.
histogramBars from the zero line to the value.
areaA line with the space below it filled.
columnsBars from the zero line to the value, drawn as a histogram.
steplineA line that holds each value until the next bar.
circlesA dot on each bar.
crossA mark on each bar, drawn as a dot.

Marker styles

The style and location options of plotshape.

StyleDraws
triangleupAn upward marker, drawn as an arrow.
triangledownA downward marker, drawn as an arrow.
arrowupAn upward arrow.
arrowdownA downward arrow.
circleA circle.
labelA small box that holds the text.
LocationPuts the marker
abovebarAbove the high of the bar.
belowbarBelow the low of the bar.
absoluteInside the bar, with no offset above or below.

Line styles

The style option of hline.

StyleDraws
solidAn unbroken line.
dashedA line of dashes.
dottedA line of dots.

Other spellings

These spellings are accepted and read as the word on the right. The plan keeps the word on the right, so formatting a script prints it. Any other key or value that a statement does not read is refused, and the message lists the ones it does.

StatementYou writeRead as
plottitle=label=
plotlinewidth=width=
plotshapetitle=text=
hlinetitle=label=
plotstyle=plot.style_linestyle=line
plotstyle=plot.style_histogramstyle=histogram
plotstyle=plot.style_areastyle=area
plotstyle=plot.style_columnsstyle=columns
plotstyle=plot.style_steplinestyle=stepline
plotstyle=plot.style_circlesstyle=circles
plotstyle=plot.style_crossstyle=cross
plotshapestyle=shape.triangleupstyle=triangleup
plotshapestyle=shape.triangledownstyle=triangledown
plotshapestyle=shape.arrowupstyle=arrowup
plotshapestyle=shape.arrowdownstyle=arrowdown
plotshapestyle=shape.circlestyle=circle
plotshapestyle=shape.labelupstyle=label
plotshapestyle=shape.labeldownstyle=label
plotshapelocation=location.abovebarlocation=abovebar
plotshapelocation=location.belowbarlocation=belowbar
plotshapelocation=location.absolutelocation=absolute
hlinestyle=hline.style_solidstyle=solid
hlinestyle=hline.style_dashedstyle=dashed
hlinestyle=hline.style_dottedstyle=dotted
input.*defval=default=
input.*minval=min=
input.*maxval=max=