faiyaz7283

Data3D

faiyaz7283 Premium Updated   
Library "Data3D"
A library for three dimensional data array.
Release Notes: v2

Refactored:
Many breaking changes from v1. Full refactoring of code, and fixed a lot of small bugs.
Release Notes: v3

Added:
cmprValuesPk(string, array, array) Set all compare boolean values for a primary key.
  Parameters:
    string: primary_key The setter primary key.
    array: values Array of booleans.
    array: arr 3d array.
  Returns: Void.

cmprFloatValuesPk(string, array) Get all compare float values of a primary key.
  Parameters:
    string: primary_key The searching primary key.
    array: arr 3d array.
  Returns: Float array.

cmprIntValuesPk(string, array) Get all compare integer values of a primary key.
  Parameters:
    string: primary_key The searching primary key.
    array: arr 3d array.
  Returns: Int array.

cmprBoolValuesPk(string, array) Get all compare boolean values of a primary key.
  Parameters:
    string: primary_key The searching primary key.
    array: arr 3d array.
  Returns: Bool array.

totalCmprValuesPk(string, array) Count total available compare values for a primary key.
  Parameters:
    string: primary_key The searching primary key.
    array: arr 3d array.
  Returns: Total int count.

rmCmprValuesPk(string, array) Remove all compare values from a primary key.
  Parameters:
    string: primary_key The searching primary key.
    array: arr 3d array.
  Returns: Void.
Release Notes: v4

Added:
Few comparison functions for cmpr values. Plus a little bit of refactoring.
Release Notes: v5
Changes:
- Removed all index based preset functions.
- All comparison functions now use Original value as first param and compared value as second. Previously it was the opposite order.
Release Notes: v6

Breaking changes from v5:
All function name changes made.

Added:
Data key types which stores data types (string, float, integer, boolean).
Release Notes: v7

Added:
Three new comparison functions.
compareSpreadToNum() - Returns an int with the value 1 (greater), 0 (equal), or -1 (less).
compareDataKeySpreadsToNums() - Returns an int array with value of 1 (greater), 0 (equal), or -1 (less).
comparePrimaryKeySpreadsToNums() - Returns an int array with value of 1 (greater), 0 (equal), or -1 (less).

A 'usage details' sections is also written at the end of the script, with a lot of examples.
Release Notes: v8

Added:
  • isAllDataKeyTypesEqual(array) : Check if all data key types are the same. Returns: Bool.
  • isDataTypeMatchAll(string, array): Check if a given data type matches with existing types. Returns: bool

Faiyaz Haider
Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this library?

Copy the following line and paste it in your script.