PINE LIBRARY
drawingutils

Library "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
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
Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.