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
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。