PINE LIBRARY
已更新 TPCLines_Public

Library "TPCLines_Public"
Helpers for lines
lineVA(start, lines, labels, lineColor, labelBgColor, labelTextColor, highPrice, lowPrice, extend, style, width, labelText, labelSize, labelStyle, labelTextAlign, bi) Draws a vertical line and optional label on the chart.
Parameters:
start: The start bar index or time.
lines: Line array to which the created line will be pushed.
labels: Label array to which the created label will be pushed.
lineColor: The color for the line and label.
labelBgColor: The background color for the label.
labelTextColor: The text color for the label.
highPrice: The upper price for the line.
lowPrice: The lower price for the line.
extend: Options for toggline line extend (extend.right, extend.left, extend.both, or extend.none). If none is provided, provides a best guess.
style: The line's style. Defaults to line.style_dotted.
width: The line's width. Defaults to 1.
labelText: Optional text to display next to the line.
labelSize: The label's size. Defaults to size.tiny.
labelStyle: The label's style. Defaults to label.style_label_left.
labelTextAlign: The label's text alignment. Defaults to text.align_center.
bi: Set true to use bar indices, set false to use time. Defaults to true (use bar indices).
Returns: Nothing. Draws a line and optional label on the chart.
lineHA(price, lines, labels, lineColor, labelBgColor, extend, labelTextColor, labelText, end, start, bi, showPrice, pips, style, width, labelAlign, labelSize, labelStyle, labelTextAlign) Draws a horizontal line and optional label on the chart.
Parameters:
price: The price at which to draw the lie.
lines: Line array to which the created line will be pushed.
labels: Label array to which the created label will be pushed.
lineColor: The color for the line and label.
labelBgColor: The background color for the label.
extend: Options for toggline line extend (extend.right, extend.left, extend.both, or extend.none). Defaults to extend.none.
labelTextColor: The text color for the label.
labelText: Optional text to display next to the line.
end: The time or bar index to end the line at.
start: The time or bar index to start the line at.
bi: Set true to use bar indices, set false to use time. Defaults to true (use bar indices).
showPrice: Option to show the price on the label.
pips: If a value is provided, will be displayed on the label.
style: The line's style. Defaults to line.style_solid.
width: The line's width. Defaults to 1.
labelAlign: Which side of the line to align the label on. Can be r for right, l for left, c for center, or t for the current time.
labelSize: The label's size. Defaults to size.tiny.
labelStyle: The label's style. Defaults to label.style_none.
labelTextAlign: The label's text alignment. Defaults to text.align_center.
Returns: Nothing. Draws a line and optional label on the chart.
lineH()
lineV()
Helpers for lines
lineVA(start, lines, labels, lineColor, labelBgColor, labelTextColor, highPrice, lowPrice, extend, style, width, labelText, labelSize, labelStyle, labelTextAlign, bi) Draws a vertical line and optional label on the chart.
Parameters:
start: The start bar index or time.
lines: Line array to which the created line will be pushed.
labels: Label array to which the created label will be pushed.
lineColor: The color for the line and label.
labelBgColor: The background color for the label.
labelTextColor: The text color for the label.
highPrice: The upper price for the line.
lowPrice: The lower price for the line.
extend: Options for toggline line extend (extend.right, extend.left, extend.both, or extend.none). If none is provided, provides a best guess.
style: The line's style. Defaults to line.style_dotted.
width: The line's width. Defaults to 1.
labelText: Optional text to display next to the line.
labelSize: The label's size. Defaults to size.tiny.
labelStyle: The label's style. Defaults to label.style_label_left.
labelTextAlign: The label's text alignment. Defaults to text.align_center.
bi: Set true to use bar indices, set false to use time. Defaults to true (use bar indices).
Returns: Nothing. Draws a line and optional label on the chart.
lineHA(price, lines, labels, lineColor, labelBgColor, extend, labelTextColor, labelText, end, start, bi, showPrice, pips, style, width, labelAlign, labelSize, labelStyle, labelTextAlign) Draws a horizontal line and optional label on the chart.
Parameters:
price: The price at which to draw the lie.
lines: Line array to which the created line will be pushed.
labels: Label array to which the created label will be pushed.
lineColor: The color for the line and label.
labelBgColor: The background color for the label.
extend: Options for toggline line extend (extend.right, extend.left, extend.both, or extend.none). Defaults to extend.none.
labelTextColor: The text color for the label.
labelText: Optional text to display next to the line.
end: The time or bar index to end the line at.
start: The time or bar index to start the line at.
bi: Set true to use bar indices, set false to use time. Defaults to true (use bar indices).
showPrice: Option to show the price on the label.
pips: If a value is provided, will be displayed on the label.
style: The line's style. Defaults to line.style_solid.
width: The line's width. Defaults to 1.
labelAlign: Which side of the line to align the label on. Can be r for right, l for left, c for center, or t for the current time.
labelSize: The label's size. Defaults to size.tiny.
labelStyle: The label's style. Defaults to label.style_none.
labelTextAlign: The label's text alignment. Defaults to text.align_center.
Returns: Nothing. Draws a line and optional label on the chart.
lineH()
lineV()
發行說明
v2發行說明
Added an option to use a different text color for horizontal lines.Pine腳本庫
秉持TradingView一貫精神,作者已將此Pine代碼以開源函式庫形式發佈,方便我們社群中的其他Pine程式設計師重複使用。向作者致敬!您可以在私人專案或其他開源發表中使用此函式庫,但在公開發表中重用此代碼須遵守社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
Pine腳本庫
秉持TradingView一貫精神,作者已將此Pine代碼以開源函式庫形式發佈,方便我們社群中的其他Pine程式設計師重複使用。向作者致敬!您可以在私人專案或其他開源發表中使用此函式庫,但在公開發表中重用此代碼須遵守社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。