Electrified

LabelHelper

Electrified ที่อัปเดต:   
Library "LabelHelper"
Utility for managing active labels on the chart.

add(level, txt, labelColor, textColor) For displaying a lable at the last bar.
  Parameters:
    level: The value to display the label at.
    txt: The text to show on the label.
    labelColor: The color of the label.
    textColor: The text color of the label.
  Returns: The label being managed.
เอกสารเผยแพร่:
v2 comment fixes
เอกสารเผยแพร่:
v3 Added tooltip option.

Updated:
add(level, txt, labelColor, textColor, tooltip) For displaying a label at the last bar.
  Parameters:
    level: The value to display the label at.
    txt: The text to show on the label.
    labelColor: The color of the label.
    textColor: The text color of the label.
    tooltip: The optional tooltip of the label.
  Returns: The label being managed.
เอกสารเผยแพร่:
v4 fixed issue with empty tootip
เอกสารเผยแพร่:
v5 Avoiding na value for tooltip.
เอกสารเผยแพร่:
v6 Added allowance for a bar offset.

Updated:
add(level, txt, labelColor, textColor, offset, tooltip) For displaying a label at the last bar.
  Parameters:
    level: The value to display the label at.
    txt: The text to show on the label.
    labelColor: The color of the label.
    textColor: The text color of the label.
    offset: A positive value will push label to the right and a negative to the left.
    tooltip: The optional tooltip of the label.
  Returns: The label being managed.
เอกสารเผยแพร่:
v7 Much improved API with higher reliability and flexibility.

Added:
refreshXPos(lbl, offset) Refreshes the x position of label.
  Parameters:
    lbl: The label to update.
    offset: A positive value will push label one bar to the right and a negative value to the left.
  Returns: The time value that was used.

create(level, txt, labelColor, textColor, size, textAlign, offset, tooltip) For creating a label at the last bar.
  Parameters:
    level: The value to display the label at.
    txt: The text to show on the label.
    labelColor: The background color of the label.
    textColor: The text color of the label.
    size: The size of the text. Default is large.
    textAlign: The alignment of the text. Default is left.
    offset: A positive value will push label to the right and a negative to the left.
    tooltip: The optional tooltip of the label.
  Returns: The label that was created.

Updated:
add(level, txt, labelColor, textColor, size, textAlign, offset, tooltip) For displaying a label at the last bar.
  Parameters:
    level: The value to display the label at.
    txt: The text to show on the label.
    labelColor: The background color of the label.
    textColor: The text color of the label.
    size: The size of the text. Default is large.
    textAlign: The alignment of the text. Default is left.
    offset: A positive value will push label to the right and a negative to the left.
    tooltip: The optional tooltip of the label.
  Returns: The label being managed.
เอกสารเผยแพร่:
v8 Deprecated .add(…) in favor of .manage(…): allows for tracking reference to a label outside the function.
.add(…) could leave a hanging label especially when values changed.

Added:
manage(src, txt, labelColor, textColor, size, textAlign, offset, tooltip) For displaying a label at the last bar.
  Parameters:
    src: The existing label to manage.
    txt: The text to show on the label.
    labelColor: The background color of the label.
    textColor: The text color of the label.
    size: The size of the text. Default is large.
    textAlign: The alignment of the text. Default is left.
    offset: A positive value will push label to the right and a negative to the left.
    tooltip: The optional tooltip of the label.
  Returns: The active label (or 'na' if no text was provided).
ไลบรารีไพน์

จิตวิญญาณที่แท้จริงของ TradingView ผู้เขียนได้ตีพิมพ์รหัส Pine นี้เป็นไลบรารีโอเพนซอร์ซเพื่อให้โปรแกรมเมอร์คนอื่น ๆ จากชุมชนของเราสามารถนำไปใช้ซ้ำได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ไลบรารีนี้เป็นการส่วนตัวหรือในสิ่งพิมพ์โอเพนซอร์สอื่น ๆ แต่นำรหัสนี้มาใช้ซ้ำในสิ่งพิมพ์จะถูกควบคุมโดย กฎระเบียบการใช้งาน

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการใช้ไลบรารีนี้หรือไม่?

คัดลอกข้อความไปยังคลิปบอร์ดแล้ววางลงในสคริปต์ของคุณ