Custom Studies Plots
When adding a Custom Study to Widget Constructor, you have the possibility to customize the style of each plot.
The plots
field is located in metainfo and contains an array with plots info.
Plot info is an object, it contains required fields id
and type
. Also it can contain other fields depending on the type of a plot.
Example:
...
plots: [
{
id: 'plot_0',
type: 'line'
},
{
id: 'plot_1',
palette: 'palette_0',
target: 'plot_0',
type: 'colorer'
},
{
id: 'plot_2',
type: 'line'
},
],
Arrows
type
- 'arrows'visible
- booleancolorup
- stringcolordown
- string
Chars
type
- 'chars'visible
- booleanchar
- stringlocation
- string, one of the following:AboveBar
BelowBar
Top
Bottom
Right
Left
Absolute
AbsoluteUp
AbsoluteDown
color
- stringtextColor
- string
Colorer
type
- 'colorer'palette
- stringtarget
- string
DataOffset
type
- 'dataoffset'target
- string
Line
type
- 'line'visible
- booleanplottype
- number, one of the following:0
- line1
- histogram3
- cross4
- area5
- columns6
- circles7
- line with breaks8
- area with breaks9
- step line
color
- stringlinestyle
- numberlinewidth
- numbertrackPrice
- boolean
Ohlc
type
- string, can be eitherohlc_open
,ohlc_high
,ohlc_low
, orohlc_close
target
- stringplottype
- string, can beohlc_bars
orohlc_candles
visible
- booleancolor
- string
If plottype: 'ohlc_candles'
, additional fields should be provided:
drawWick
- booleandrawBorder
- booleanwickColor
- stringborderColor
- string
Shapes
type
- 'shapes'visible
- booleanplottype
- string, can have following values:shape_arrow_down
shape_arrow_up
shape_circle
shape_cross
shape_xcross
shape_diamond
shape_flag
shape_square
shape_label_down
shape_label_up
shape_triangle_down
shape_triangle_up
location
- string, one of the following:AboveBar
BelowBar
Top
Bottom
Right
Left
Absolute
AbsoluteUp
AbsoluteDown
color
- stringtextColor
- string
BarColorer
type
- 'bar_colorer'palette
- string
BgColorer
type
- 'bg_colorer'palette
- string
TextColorer
type
- 'text_colorer'palette
- stringtarget
- string
OhlcColorer
type
- 'ohlc_colorer'palette
- stringtarget
- string