PINE LIBRARY

ObjectHelpers

تم تحديثه
Library "ObjectHelpers"
Line | Box | Label | Linefill -- Maker, Setter, Getter Library
TODO: add table functionality

set(object)
  set all params for `line`, `box`, `label`, `linefill` objects with 1 function
***
## Overloaded
***
```
method set(line Line, int x1=na, float y1=na, int x2=na, float y2=na,string xloc=na,string extend=na,color color=na,string style=na,int width=na,bool update=na) => line
```
### Params
- **Line** `line` - line object | `required`
- **x1** `int` - value to set x1
- **y1** `float` - value to set y1
- **x2** `int` - value to set x2
- **y2** `float` - value to set y2
- **xloc** `int` - value to set xloc
- **yloc** `int` - value to set yloc
- **extend** `string` - value to set extend
- **color** `color` - value to set color
- **style** `string` - value to set style
- **width** `int` - value to set width
- **update** `bool` - value to set update
***
```
method set(box Box,int left=na,float top=na,int right=na, float bottom=na,color bgcolor=na,color border_color=na,string border_style=na,int border_width=na,string extend=na,string txt=na,color text_color=na,string text_font_family=na,string text_halign=na,string text_valign=na,string text_wrap=na,bool update=false) => box
```
### Params
- **Box** `box` - box object
- **left** `int` - value to set left
- **top** `float` - value to set top
- **right** `int` - value to set right
- **bottom** `float` - value to set bottom
- **bgcolor** `color` - value to set bgcolor
- **border_color** `color` - value to set border_color
- **border_style** `string` - value to set border_style
- **border_width** `int` - value to set border_width
- **extend** `string` - value to set extend
- **txt** `string` - value to set _text
- **text_color** `color` - value to set text_color
- **text_font_family** `string` - value to set text_font_family
- **text_halign** `string` - value to set text_halign
- **text_valign** `string` - value to set text_valign
- **text_wrap** `string` - value to set text_wrap
- **update** `bool` - value to set update
***
```
method set(label Label,int x=na,float y=na, string txt=na,string xloc=na,color color=na,color textcolor=na,string size=na,string style=na,string textalign=na,string tooltip=na,string text_font_family=na,bool update=false) => label
```
### Paramas
- **Label** `label` - label object
- **x** `int` - value to set x
- **y** `float` - value to set y
- **txt** `string` - value to set text add`"+++"` to the _text striing to have the current label text concatenated to the location of the "+++")
- **textcolor** `color` - value to set textcolor
- **size** `string` - value to set size
- **style** `string` - value to set style (use "flip" ,as the style to have label flip to top or bottom of bar depending on if open > close and vice versa)
- **text_font_family** `string` - value to set text_font_family
- **textalign** `string` - value to set textalign
- **tooltip** `string` - value to set tooltip
- **update** `bool` - update label to next bar
***
```
method set(linefill Linefill=na,line line1=na,line line2=na,color color=na) => linefill
```
### Params
- **linefill** `linefill` - linefill object
- **line1** `line` - line object
- **line2** `line` - line object
- **color** `color` - color
  Parameters:
    object (obj)
  Returns: `line`, `box`, `label`, `linefill`

method set(Line, x1, y1, x2, y2, xloc, extend, color, style, width, update)
  set the location params of a line with 1 function auto detects time or bar_index for xloc param
  Namespace types: series line
  Parameters:
    Line (line): `line` - line object | `required`
    x1 (int): `int` - value to set x1
    y1 (float): `float` - value to set y1
    x2 (int): `int` - value to set x2
    y2 (float): `float` - value to set y2
    xloc (string): `int` - value to set xloc
    extend (string): `string` - value to set extend
    color (color): `color` - value to set color
    style (string): `string` - value to set style
    width (int): `int` - value to set width
    update (bool): `bool` - value to set update
  Returns: `line`

method set(Box, left, top, right, bottom, bgcolor, border_color, border_style, border_width, extend, txt, text_color, text_font_family, text_halign, text_valign, text_wrap, update)
  set the location params of a box with 1 function
  Namespace types: series box
  Parameters:
    Box (box): `box` - box object | `required`
    left (int): `int` - value to set left
    top (float): `float` - value to set top
    right (int): `int` - value to set right
    bottom (float): `float` - value to set bottom
    bgcolor (color): `color` - value to set bgcolor
    border_color (color): `color` - value to set border_color
    border_style (string): `string` - value to set border_style
    border_width (int): `int` - value to set border_width
    extend (string): `string` - value to set extend
    txt (string): `string` - value to set _text
    text_color (color): `color` - value to set text_color
    text_font_family (string): `string` - value to set text_font_family
    text_halign (string): `string` - value to set text_halign
    text_valign (string): `string` - value to set text_valign
    text_wrap (string): `string` - value to set text_wrap
    update (bool): `bool` - value to set update
  Returns: `box`

method set(Label, x, y, txt, xloc, color, textcolor, size, style, textalign, tooltip, text_font_family, update)
  set the location params of a label with 1 function auto detects time or bar_index for xloc param
  Namespace types: series label
  Parameters:
    Label (label): `label` | `required`
    x (int): `int` - value to set x
    y (float): `float` - value to set y
    txt (string): `string` - value to set text add`"+++"` to the _text striing to have the current label text concatenated to the location of the "+++")
    xloc (string)
    color (color)
    textcolor (color): `color` - value to set textcolor
    size (string): `string` - value to set size
    style (string): `string` - value to set style (use "flip" ,as the style to have label flip to top or bottom of bar depending on if open > close and vice versa)
    textalign (string): `string` - value to set textalign
    tooltip (string): `string` - value to set tooltip
    text_font_family (string): `string` - value to set text_font_family
    update (bool): `bool` - update label to next bar
  Returns: `label`

method set(Linefill, line1, line2, color)
  change the 1 or 2 of the lines in a linefill object
  Namespace types: series linefill
  Parameters:
    Linefill (linefill)
    line1 (line): `line` - line object
    line2 (line): `line` - line object
    color (color): `color` - color
  Returns: `linefill`

get(object)
  get all of the location variables for `line`, `box`, `label` objects or the line objects from a `linefill`
***
## Overloaded
***
```
method get(line Line) => [int x1, float y1, int x2, float y2]
```
### Params
- **Line** `line` - line object | `required`
***
```
method get(box Box) => [int left, float top, int right, float bottom]
```
### Params
- **Box** `box` - box object | `required`
***
```
method get(label Label) => [int x, float y, string _text]
```
### Paramas
- **Label** `label` - label object | `required`
***
```
method get(linefill Linefill) => [line line1, line line2]
```
### Params
- **Linefill** `linefill` - linefill object | `required`
  Parameters:
    object (obj)
  Returns: `[location variables of object]`

method get(Line)
  Gets the location paramaters of a Line
  Namespace types: series line
  Parameters:
    Line (line): `line` - line object
  Returns: [`int x1`,`float y1`,`int x2`,`float y2`]

method get(Box)
  Gets the location paramaters of a Box
  Namespace types: series box
  Parameters:
    Box (box): `box` - box object
  Returns: [`int left`,`float top`,`int right`,`float bottom`]

method get(Label)
  Gets the `x`, `y`, `text` of a Label
  Namespace types: series label
  Parameters:
    Label (label): `label` - label object
  Returns: [`int x`,`float y`,`string _text`]

method get(Linefill)
  Gets `line 1`, `line 2` from a Linefill
  Namespace types: series linefill
  Parameters:
    Linefill (linefill): `linefill` - linefill object
  Returns: [`line line1`,`line line2`]

method set_x(Line, x1, x2)
  set the `x1`, `x2` of a line
***
### Params
- **Line** `line` - line object | `required`
- **x1** `int` - value to set x1 | `required`
- **x2** `int` - value to set x2 | `required`
  Namespace types: series line
  Parameters:
    Line (line): `line` - line object
    x1 (int): `int` - value to set x1
    x2 (int): `int` - value to set x2
  Returns: `line`

method set_y(Line, y1, y2)
  set `y1`, `y2` of a line
***
### Params
- **Line** `line` - line object | `required`
- **y1** `float` - value to set y1 | `required`
- **y2** `float` - value to set y2 | `required`
  Namespace types: series line
  Parameters:
    Line (line): `line` - line object
    y1 (float): `float` - value to set y1
    y2 (float): `float` - value to set y2
  Returns: `line`

method Line(x1, y1, x2, y2, extend, color, style, width)
  Similar to `line.new()` but can detect time or bar_index for xloc param and has defaults for all params but `x1`, `y1`, `x2`, `y2`
***
### Params
- **x1** `int` - value to set
- **y1** `float` - value to set
- **x2** `int` - value to set
- **y2** `float` - value to set
- **extend** `string` - extend value to set line
- **color** `color` - color to set line
- **style** `string` - style to set line
- **width** `int` - width to set line
  Namespace types: series int, simple int, input int, const int
  Parameters:
    x1 (int): `int` - value to set
    y1 (float): `float` - value to set
    x2 (int): `int` - value to set
    y2 (float): `float` - value to set
    extend (string): `string` - extend value to set line
    color (color): `color` - color to set line
    style (string): `string` - style to set line
    width (int): `int` - width to set line
  Returns: `line`

method Box(left, top, right, bottom, extend, border_color, bgcolor, text_color, border_width, border_style, txt, text_halign, text_valign, text_size, text_wrap)
  similar to box.new() with the but can detect xloc param and has defaults for everything but location params
***
### Params
- **left** `int` - value to set
- **top** `float` - value to set
- **right** `int` - value to set
- **bottom** `float` - value to set
- **extend** `string` - extend value to set box
- **border_color** `color` - color to set border
- **bgcolor** `color` - color to set background
- **text_color** `color` - color to set text
- **border_width** `int` - width to set border
- **border_style** `string` - style to set border
- **txt** `string` - text to set
- **text_halign** `string` - horizontal alignment to set text
- **text_valign** `string` - vertical alignment to set text
- **text_size** `string` - size to set text
- **text_wrap** `string` - wrap to set text
  Namespace types: series int, simple int, input int, const int
  Parameters:
    left (int): `int` - value to set
    top (float): `float` - value to set
    right (int): `int` - value to set
    bottom (float): `float` - value to set
    extend (string): `string` - extend value to set box
    border_color (color): `color` - color to set border
    bgcolor (color): `color` - color to set background
    text_color (color): `color` - color to set text
    border_width (int): `int` - width to set border
    border_style (string): `string` - style to set border
    txt (string): `string` - text to set
    text_halign (string): `string` - horizontal alignment to set text
    text_valign (string): `string` - vertical alignment to set text
    text_size (string): `string` - size to set text
    text_wrap (string): `string` - wrap to set text
  Returns: `box`

method Label(txt, x, y, yloc, color, textcolor, style, size, textalign, text_font_family, tooltip)
  Similar to label.new() but can detect time or bar_index for xloc param and has defaults for all params but x, y, txt, tooltip \n
***
### Params
- **txt** `string` - string to set
- **x** `int` - value to set
- **y** `float` - value to set
- **yloc** `string` - y location to set
- **color** `color` - label color to set
- **textcolor** `color` - text color to set
- **style** `string` - style to set
- **size** `string` - size to set
- **textalign** `string` - text alignment to set
- **text_font_family** `string` - font family to set
- **tooltip** `string` - tooltip to set
  Namespace types: series string, simple string, input string, const string
  Parameters:
    txt (string): `string` - string to set
    x (int): `int` - value to set
    y (float): `float` - value to set
    yloc (string): `string` - y location to set
    color (color): `color` - label color to set
    textcolor (color): `color` - text color to set
    style (string): `string` - style to set
    size (string): `string` - size to set
    textalign (string): `string` - text alignment to set
    text_font_family (string): `string` - font family to set
    tooltip (string): `string` - tooltip to set
  Returns: `label`

obj
  Fields:
    obj (series__string)
ملاحظات الأخبار
v2
=D
ملاحظات الأخبار
v3
=O
ملاحظات الأخبار
fixed typo
ملاحظات الأخبار
.
ملاحظات الأخبار
v6

Capitalized for letter of functions due to issues with builtins
ملاحظات الأخبار
.
BOXcolorsdisplayffrizzfrizlabzlabellibraryLINElinefillMarket Geometry

مكتبة باين

كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشور تحكمه قوانين الموقع.


يعمل أيضًا:

إخلاء المسؤولية