PINE LIBRARY
업데이트됨 debug

Library "debug"
Show Array or Matrix Elements In Table
Use anytime you want to see the elements in an array or a matrix displayed.
Effective debugger, particularly for strategies and complex logic structures.
Look in code to find instructions. Reach out if you need assistance.
Functionality includes:
Types Allowed:
debug(_col, _row, _name, _value, _msg, _ip)
Debug Variables in Matrix
Parameters:
_col (int): (int) Assign Column
_row (int): (int) Assign Row
_name (matrix<string>): (simple matrix) Matrix Name
_value (string): (string) Assign variable as a string (str.tostring())
_msg (string)
_ip (int): (int) (default 1) 1 for continuous updates. 2 for barstate.isnew updates. 3 for barstate.isconfirmed updates. -1 to only add once
Returns: Returns Variable _value output and _msg formatted as '_msg: variableOutput' in designated column and row
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (float)
_msg (string)
_ip (int)
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (int)
_msg (string)
_ip (int)
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (bool)
_msg (string)
_ip (int)
debugs(_col, _row, _name, _msg)
Debug Scope in Matrix - Identify When Scope Is Accessed
Parameters:
_col (int): (int) Column Number
_row (int): (int) Row Number
_name (matrix<string>): (simple matrix) Matrix Name
_msg (string): (string) Message
Returns: Message appears in debug panel using _col/_row as the identifier
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Array Element Display (Supports float[], int[], string[], and bool[])
Parameters:
_arrayName (float[]): ID of Array to be Displayed
_pos (string): Position for Table
_txtSize (string): Size of Table Cell Text
_tRows (int): Number of Rows to Display Data In (columns will be calculated accordingly)
s_index (bool): (Optional. Default True.) Show/Hide Index Numbers
s_border (bool): (Optional. Default False.) Show/Hide Border
_rowCol (string)
bCol (color): = (Optional. Default Black.) Frame/Border Color.
_fillCond (bool): (Optional) Conditional statement. Function displays array only when true. For instances where size is not immediately known or indices are na. Default = true, indicating array size is set at bar_index 0.
_offset (int): (Optional) Use to view historical array states. Default = 0, displaying realtime bar.
Returns: A Display of Array Values in a Table
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (int[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (string[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (bool[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Matrix Element Display (Supports <float>, <int>, <string>, and <bool>)
Parameters:
_matrixName (matrix<float>): ID of Matrix to be Displayed
_pos (string): Position for Table
_txtSize (string): Size of Table Cell Text
s_index (bool): (Optional. Default True.) Show/Hide Index Numbers
_resetIdx (bool)
s_border (bool): (Optional. Default False.) Show/Hide Border
bCol (color): = (Optional. Default Black.) Frame/Border Color.
_fillCond (bool): (Optional) Conditional statement. Function displays matrix only when true. For instances where size is not immediately known or indices are na. Default = true, indicating matrix size is set at bar_index 0.
_offset (int): (Optional) Use to view historical matrix states. Default = 0, displaying realtime bar.
Returns: A Display of Matrix Values in a Table
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<int>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<string>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<bool>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
Show Array or Matrix Elements In Table
Use anytime you want to see the elements in an array or a matrix displayed.
Effective debugger, particularly for strategies and complex logic structures.
Look in code to find instructions. Reach out if you need assistance.
Functionality includes:
- Viewing the contents of an array or matrix on screen.
- Track variables and variable updates using debug()
- Track if and when local scopes fire using debugs()
Types Allowed:
- string
- float
- int
- string
debug(_col, _row, _name, _value, _msg, _ip)
Debug Variables in Matrix
Parameters:
_col (int): (int) Assign Column
_row (int): (int) Assign Row
_name (matrix<string>): (simple matrix) Matrix Name
_value (string): (string) Assign variable as a string (str.tostring())
_msg (string)
_ip (int): (int) (default 1) 1 for continuous updates. 2 for barstate.isnew updates. 3 for barstate.isconfirmed updates. -1 to only add once
Returns: Returns Variable _value output and _msg formatted as '_msg: variableOutput' in designated column and row
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (float)
_msg (string)
_ip (int)
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (int)
_msg (string)
_ip (int)
debug(_col, _row, _name, _value, _msg, _ip)
Parameters:
_col (int)
_row (int)
_name (matrix<string>)
_value (bool)
_msg (string)
_ip (int)
debugs(_col, _row, _name, _msg)
Debug Scope in Matrix - Identify When Scope Is Accessed
Parameters:
_col (int): (int) Column Number
_row (int): (int) Row Number
_name (matrix<string>): (simple matrix) Matrix Name
_msg (string): (string) Message
Returns: Message appears in debug panel using _col/_row as the identifier
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Array Element Display (Supports float[], int[], string[], and bool[])
Parameters:
_arrayName (float[]): ID of Array to be Displayed
_pos (string): Position for Table
_txtSize (string): Size of Table Cell Text
_tRows (int): Number of Rows to Display Data In (columns will be calculated accordingly)
s_index (bool): (Optional. Default True.) Show/Hide Index Numbers
s_border (bool): (Optional. Default False.) Show/Hide Border
_rowCol (string)
bCol (color): = (Optional. Default Black.) Frame/Border Color.
_fillCond (bool): (Optional) Conditional statement. Function displays array only when true. For instances where size is not immediately known or indices are na. Default = true, indicating array size is set at bar_index 0.
_offset (int): (Optional) Use to view historical array states. Default = 0, displaying realtime bar.
Returns: A Display of Array Values in a Table
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (int[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (string[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, _fillCond, _offset)
Parameters:
_arrayName (bool[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Matrix Element Display (Supports <float>, <int>, <string>, and <bool>)
Parameters:
_matrixName (matrix<float>): ID of Matrix to be Displayed
_pos (string): Position for Table
_txtSize (string): Size of Table Cell Text
s_index (bool): (Optional. Default True.) Show/Hide Index Numbers
_resetIdx (bool)
s_border (bool): (Optional. Default False.) Show/Hide Border
bCol (color): = (Optional. Default Black.) Frame/Border Color.
_fillCond (bool): (Optional) Conditional statement. Function displays matrix only when true. For instances where size is not immediately known or indices are na. Default = true, indicating matrix size is set at bar_index 0.
_offset (int): (Optional) Use to view historical matrix states. Default = 0, displaying realtime bar.
Returns: A Display of Matrix Values in a Table
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<int>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<string>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<bool>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
_fillCond (bool)
_offset (int)
릴리즈 노트
v2Minor Update. Pushed text alignment for multi line table boxes to top left. Also, given how it's built I can't really make too much customizable, but I did add a text color modifier. So nothing huge, but the alignment change is going to help me out with my project.
Updated:
viewArray(_arrayName, _pos, _txtSize, _tRows, s_index, s_border, _rowCol, bCol, txtCol, _fillCond, _offset)
Parameters:
_arrayName (bool[])
_pos (string)
_txtSize (string)
_tRows (int)
s_index (bool)
s_border (bool)
_rowCol (string)
bCol (color)
txtCol (color)
_fillCond (bool)
_offset (int)
viewMatrix(_matrixName, _pos, _txtSize, s_index, _resetIdx, s_border, bCol, txtCol, _fillCond, _offset)
Parameters:
_matrixName (matrix<bool>)
_pos (string)
_txtSize (string)
s_index (bool)
_resetIdx (bool)
s_border (bool)
bCol (color)
txtCol (color)
_fillCond (bool)
_offset (int)
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.