drawingutils

methods used in my scripts for some basic and customized drawings and arrays.
method line(this, p1, p2, lineColor, style, width, xloc, extend)
Draws line and adds to the array
Namespace types: array<line>
Parameters:
this (array<line>): array to which the created line needs to be added
p1 (chart.point): point1 of the line
p2 (chart.point): point2 of the line
lineColor (color): line color
style (string): line style
width (int): line width
xloc (string): xloc.bar_index or xloc.bar_time
extend (string): default is extend.none
Returns: line created
method label(this, p, txt, tooltip, xloc, yloc, color, style, textcolor, size, textalign)
Draws label and adds to the array
Namespace types: array<label>
Parameters:
this (array<label>): array to which the created label needs to be added
p (chart.point): point at which the label needs to be drawn
txt (string): label text
tooltip (string): tooltip text
xloc (string): xloc value - xloc.bar_index or xloc.bar_time
yloc (string): y location of the label
color (color): label color
style (string): label style
textcolor (color): label text color
size (string): Size of the label
textalign (string): text alignment
Returns: label created
method linefill(this, ln1, ln2, fillColor, transparency)
Draws linefill and adds to array
Namespace types: array<linefill>
Parameters:
this (array<linefill>): array to which the created linefill needs to be added
ln1 (line): line1 of the fill
ln2 (line): line2 of the fill
fillColor (color): fill Color
transparency (int): fill transparency
Returns: linefill created
draw_labelled_line(target, lblText, linecolor, labelcolor, index, highlight, linesArray, labelsArray, highlightSize, tinySize, yloc, textalign)
Draws labelled line
Parameters:
target (float): target price
lblText (string): label text
linecolor (color): line color
labelcolor (color): label color
index (int): index to calculate the distance offset
highlight (bool): highlight true/false
linesArray (array<line>): array of lines where the created line is added
labelsArray (array<label>): array of labels where the created label is added
highlightSize (string): Size of highlighted text
tinySize (string): size of non highlighted text
yloc (string): y location
textalign (string): text alignment
Returns: void
draw_labelled_box(y1, y2, labelColor, labelText, index, boxArray, labelArray, borderColor, borderStyle, borderWidth, textAlign, highlight, highLightLabel)
Draws custom labelled box
Parameters:
y1 (float): price 1 of the box
y2 (float): price 2 of the box
labelColor (color): label color
labelText (string): label text
index (int): index to calculate the offset distance
boxArray (array<box>): box array to which the box needs to be added
labelArray (array<label>): label array to which the label needs to be added
borderColor (color): border color
borderStyle (string): border style
borderWidth (int): border width
textAlign (string): text align of the label
highlight (bool): highlight label text
highLightLabel (bool): highlight label size
Returns: void
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Haftungsausschluss
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io