PINE LIBRARY
已更新 [LIB] Array / Matrix Display

Library "ArrayMatrixHUD"
Show Array or Matrix Elements In Table
For Arrays: Set the number of rows you want the data displayed in and it will generate a table, calculating the columns based on the size of the array being displayed.
For Matrix: It will automatically match the Rows and Columns to the values in the matrix.
Note: On the left, the table shows the index of the array/matrix value starting at 1. So, to call that value from inside the array, subtract 1 from the index value to the left. For matrices, keep in mind that the row and column are also starting at one when trying to call a value from the matrix. The numbering of the values on the left is for display purposes only.
viewArray(_arrayName, _pos, _txtSize, _tRows)
Array Element Display (Supports float, int, string, and bool)
Parameters:
_arrayName: ID of Array to be Displayed
_pos: Position for Table
_txtSize: Size of Table Cell Text
_tRows: Number of Rows to Display Data In (columns will be calculated accordingly)
Returns: A Display of Array Values in a Table
viewMatrix(_matrixName, _pos, _txtSize)
Matrix Element Display (Supports float, int, string, and bool)
Parameters:
_matrixName: ID of Matrix to be Displayed
_pos: Position for Table
_txtSize: Size of Table Cell Text
Returns: A Display of Matrix Values in a Table
Show Array or Matrix Elements In Table
For Arrays: Set the number of rows you want the data displayed in and it will generate a table, calculating the columns based on the size of the array being displayed.
For Matrix: It will automatically match the Rows and Columns to the values in the matrix.
Note: On the left, the table shows the index of the array/matrix value starting at 1. So, to call that value from inside the array, subtract 1 from the index value to the left. For matrices, keep in mind that the row and column are also starting at one when trying to call a value from the matrix. The numbering of the values on the left is for display purposes only.
viewArray(_arrayName, _pos, _txtSize, _tRows)
Array Element Display (Supports float, int, string, and bool)
Parameters:
_arrayName: ID of Array to be Displayed
_pos: Position for Table
_txtSize: Size of Table Cell Text
_tRows: Number of Rows to Display Data In (columns will be calculated accordingly)
Returns: A Display of Array Values in a Table
viewMatrix(_matrixName, _pos, _txtSize)
Matrix Element Display (Supports float, int, string, and bool)
Parameters:
_matrixName: ID of Matrix to be Displayed
_pos: Position for Table
_txtSize: Size of Table Cell Text
Returns: A Display of Matrix Values in a Table
發行說明
v2Updates.
2 New Optional Parameters:
- _fillCond (Optional) Conditional statement. Function displays array only when true. For instances where indices are na. Default = true, indicating array size is set at bar_index 0.
- _offset (Optional) Use to view historical array states. Default = 0, displaying realtime bar.
Displays <float>, <int>, <string>, and <bool> arrays and matrices.
發行說明
v3 This is a huge release. Complete game changer for me anyway. Now we have ezpz debugging.This addition to the library adds debugging capability to anything your heart desires in your script.
There are two debug functions: debug() and debugs().
debug() is for Conditionals, variable outputs, variable updates. It converts the designated variable to a string and will display additional information defined by _msg argument.
This function does not need a variable name.
Example:
Pine Script®
debug(0,0, _matrixName, variable, "Message")
debugs() is for scope testing. If you need to understand which scopes are triggering, this function will cause its scope location to show up in the panel when that scope is accessed. For this to work, you have to put the function inside of the scope you want to analyze.
This function does not need a variable name.
Example:
Pine Script®
debugs(0,1, _matrixName, "Message")
Added:
debug(_col, _row, _name, _value, _lb, _ip)
Debug Variables in Matrix
Parameters:
_col: (int) Assign Column
_row: (int) Assign Row
_name: (simple matrix) Matrix Name
_value: (string) Assign variable as a string (str.tostring())
_lb: (string) Constant label (optional)
_ip: (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 of debug panel
debugs(_col, _row, _name, _msg)
Debug Scope in Matrix - Identify When Scope Is Accessed
Parameters:
_col: (int) Column Number
_row: (int) Row Number
_name: (simple matrix) Matrix Name
_msg: (string) Message
Returns: Message appears in debug panel using _col/_row as the identifier
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。