PINE LIBRARY

StyleLibrary

Güncellendi
Library "StyleLibrary"
A small library of Pine Script functions that return built-in style variables.

method sizeStyle(size)
  Takes a `string` that returns the corresponding built-in size style variable.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    size (string): A `string` representing a built-in size style: `"Tiny"`, `"Small"`, `"Normal"`, `"Large"`,
`"Huge"`, `"Auto"`.
  Returns: The respective built-in size style variable.

method sizeStyle(size)
  Takes a `sizeStyle` that returns the corresponding built-in size style variable.
  Namespace types: series sizeStyle
  Parameters:
    size (series sizeStyle): A `sizeStyle` representing a built-in size style variable.
  Returns: The respective built-in size style variable.

method lineStyle(style)
  Takes a `string` that returns the corresponding built-in line style variable.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    style (string): A `string` representing a built-in line style: `"Dashed"`, `"Dotted"`, `"Solid"`.
  Returns: The respective built-in line style variable.

method lineStyle(style)
  Takes a `lineStyle` that returns the corresponding built-in line style variable.
  Namespace types: series lineStyle
  Parameters:
    style (series lineStyle): A `lineStyle` representing a built-in line style variable.
  Returns: The respective built-in line style variable.

method labelStyle(style)
  Takes a `string` that returns the corresponding built-in label style variable.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    style (string): A `string` representing a built-in label style:
`"Arrow Down"`, `"Arrow Up"`, `"Circle"`, `"Cross"`, `"Diamond"`, `"Flag"`,
`"Label Center"`, `"Label Down"`, `"Label Left"`, `"Label Lower Left"`,
`"Label Lower Right"`, `"Label Right"`, `"Label Up"`, `"Label Upper Left"`,
`"Label Upper Right"`, `"None"`, `"Square"`, `"Text Outline"`, `"Triangle Down"`,
`"Triangle Up"`, `"XCross"`.
  Returns: The respective built-in label style variable.

method labelStyle(style)
  Takes a `labelStyle` that returns the corresponding built-in label style variable.
  Namespace types: series labelStyle
  Parameters:
    style (series labelStyle): A `labelStyle` representing a built-in label style variable.
  Returns: The respective built-in label style variable.

method fontStyle(font)
  Takes a `string` that returns the corresponding built-in font style variable.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    font (string): A `string` representing a built-in font style: `"Default"`, `"Monospace"`.
  Returns: The respective built-in font style variable.

method positionStyle(position)
  Takes a `string` that returns the corresponding built-in position style variable.
  Namespace types: series string, simple string, input string, const string
  Parameters:
    position (string): A `string` representing a built-in position style:
`"Bottom Center", `"Bottom Left", `"Bottom Right", `"Middle Center", `"Middle Left",
`"Middle Right", `"Top Center", `"Top Left", `"Top Right".
  Returns: The respective built-in position style variable.

method displayStyle(display)
  Takes a `simple string` that returns the corresponding built-in display style variable.
  Namespace types: simple string, input string, const string
  Parameters:
    display (simple string): A `simple string` representing a built-in display style: `"All"`, `"Data Window"`,
`"None"`, `"Pane"`, `"Price Scale"`, `"Status Line"`.
  Returns: The respective built-in display style variable.
Sürüm Notları
v2
  • 6️⃣ Update StyleLibrary for Pine Script™ v6.
  • 🆕 Enumerations for styling the box border, extend, font, position, text align, and text wrap parameters of drawings.
  • 🆕 Function methods for styling with strings or enumerations.
  • 🏫 A "Usage" section at the bottom of the function preview hover with an small example of how to use the library.
  • 🧵 All string parameters are no longer case sensitive.
  • 🧾 A "Used in..." section in the function preview hover to see which built-in functions have parameters that use a given styling function's output.
  • 🪂 Calling a StyleLibrary function using a string method with a misspelt or empty string will fallback on and return the same default styles used in corresponding built-in functions.
  • 📜 Specifying MIT License. StyleLibrary v1 had no license.
  • 🔄 Remove "Style" from the name of all functions.
BOXfontformattinginputslabelLINESIZEstringsstyletabletextwrap

Pine kitaplığı

Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazar çok yaşa! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanılması Ev kuralları tarafından yönetilir.


Aynı zamanda::

Feragatname