Library "_matrix" Library helps visualize matrix as array of arrays and enables users to use array methods such as push, pop, shift, unshift etc along with cleanup activities on drawing objects wherever required unshift(mtx, row) unshift array of lines to first row of the matrix Parameters: mtx : matrix of lines row : array of lines to be...
Library "FunctionMatrixSolve" Matrix Equation solution for Ax = B, finds the value of x. solve(A, B) Solves Matrix Equation for Ax = B, finds value for x. Parameters: A : matrix, Square matrix with data values. B : matrix, One column matrix with data values. Returns: matrix with X, x = A^-1 b, assuming A is square and has full...
Library "FunctionPolynomialFit" Performs Polynomial Regression fit to data. In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modelled as an nth degree polynomial in x. reference: en.wikipedia.org www.bragitoff.com gauss_elimination(A, m, n) ...
Library "InitialiseArrays" @description: Efficiently create arrays, populating them with an arbitrary number of elements and setting their starting values. Works with a mix of typed and na values. A limitation of the built-in functions to create arrays is that while you can create and populate arrays with a single command, you can only set all elements to the...
Library "drawingutils" Private methods used in my scripts for some basic and customized drawings. No documentation provided as these are meant for private use only. draw_line() draw_label() draw_linefill() draw_labelled_line() draw_labelled_box() runTimer()
█ OVERVIEW This library is a Pine Script™ programmer’s tool containing functions that average values selectively. █ CONCEPTS Averaging can be useful to smooth out unstable readings in the data set, provide a benchmark to see the underlying trend of the data, or to provide a general expectancy of values in establishing a central tendency. Conventional...
Library "harmonicpatternsarrays" Library provides an alternative method to scan harmonic patterns and contains utility functions using arrays. These are mostly customized for personal use. Hence, will not add documentation for arrays. All credit to @HeWhoMustNotBeNamed getLabel() delete() delete() delete() delete() delete() pop() ...
Library "json" Convert JSON strings to tradingview ▦ FEATURES ▦ █ Json to array █ Get json key names █ Get json key values █ Size of json get_json_keys_names(raw_json) Returns string array with all key names Parameters: raw_json : (string) Raw JSON string Returns: (string array) Array with all...
Library "JohnEhlersFourierTransform" Fourier Transform for Traders By John Ehlers, slightly modified to allow to inspect other than the 8-50 frequency spectrum. reference: www.mesasoftware.com high_pass_filter(source) Detrended version of the data by High Pass Filtering with a 40 Period cutoff Parameters: source : float, data source. Returns:...
Library "harmonicpatterns1" harmonicpatterns: methods required for calculation of harmonic patterns. Correction for library (missing export in line 303) isGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max) isGartleyPattern: Checks for harmonic pattern Gartley Parameters: xabRatio : AB/XA abcRatio : BC/AB bcdRatio :...
Library "FunctionCosineSimilarity" Cosine Similarity method. function(sample_a, sample_b) Measure the similarity of 2 vectors. Parameters: sample_a : float array, values. sample_b : float array, values. Returns: float. diss(cosim) Dissimilarity helper function. Parameters: cosim : float, cosine similarity value (0 > 1) Returns: float
Library "ArrayOperations" Array element wise basic operations. add(sample_a, sample_b) Adds sample_b to sample_a and returns a new array. Parameters: sample_a : values to be added to. sample_b : values to add. Returns: array with added results. - sample_a provides type format for output. - arrays do not need to be symmetric. - sample_a must...
Library "WIPNNetwork" this is a work in progress (WIP) and prone to have some errors, so use at your own risk... let me know if you find any issues.. Method for a generalized Neural Network. network(x) Generalized Neural Network Method. Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns
Library "FunctionPatternDecomposition" Methods for decomposing price into common grid/matrix patterns. series_to_array(source, length) Helper for converting series to array. Parameters: source : float, data series. length : int, size. Returns: float array. smooth_data_2d(data, rate) Smooth data sample into 2d points. Parameters: data...
Library "FunctionBlackScholes" Some methods for the Black Scholes Options Model, which demonstrates several approaches to the valuation of a European call. // reference: // people.math.sc.edu // people.math.sc.edu asset_path(s0, mu, sigma, t1, n) Simulates the behavior of an asset price over time. Parameters: s0 : float, asset price at...
Library "ArrayExt" Array extensions get(a, idx) Get element from the array at index, or na if index not found Parameters: a : The array idx : The array index to get Returns: The array item if exists or na get(a, idx) Get element from the array at index, or na if index not found Parameters: a : The array idx : The array index to...
Library "FunctionMinkowskiDistance" Method for Minkowski Distance, The Minkowski distance or Minkowski metric is a metric in a normed vector space which can be considered as a generalization of both the Euclidean distance and the Manhattan distance. It is named after the German mathematician Hermann Minkowski. reference: en.wikipedia.org double(point_ax,...
Currently in PineScript you cannot modify global variables in functions because of scope limitations. One way to work around that is to use arrays. This Library simplifies the use of arrays as global variables to make your code look cleaner. If you're coming from other programming languages, I'm sure you will come across this issue in your PineScript journey at...