Library "AdxCalcHourly" getBars() getBars: Returns the number of bars to use in the historical lookback period Returns: simple int directionDown() directionDown: Calculates the direction down for bar_index Returns: series float directionUp() directionUp: Calculates the direction up for bar_index Returns: series float ...
Library "WpProbabilisticLib" Library that contains functions to calculate probabilistic based on historical candle analysis CandleType(open, close) This function check what type of candle is, based on its close and open prices Parameters: open : series float (open price) close : series float (close price) Returns: This function return the...
This library was designed to create three different datasets using Bill Williams fractals. The goal is to spot trends in reversal data and ultimately use these datasets to help predict future price reversals. First, the pivot() function is used to initialize and populate three separate arrays (high pivot , low pivot , all pivots ). Since each high/low price...
Library "AutoFiboRetrace" TODO: add library description here fun(x) TODO: add function description here Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns
Library "MonthlyReturnsVsMarket" is a repackaging of the script here Credits to @QuantNomad for orginal script Now you can avoid to pollute your own strategy's code with the monthly returns table code and just import the library and call displayMonthlyPnL(int precision) function To be used in strategy scripts.
Library "Canvas" A library implementing a kind of "canvas" using a table where each pixel is represented by a table cell and the pixel color by the background color of each cell. To use the library, you need to create a color matrix (represented as an array) and a canvas table. The canvas table is the container of the canvas, and the color matrix determines...
Library "OrdinaryLeastSquares" One of the most common ways to estimate the coefficients for a linear regression is to use the Ordinary Least Squares (OLS) method. This library implements OLS in pine. This implementation can be used to fit a linear regression of multiple independent variables onto one dependent variable, as long as the assumptions behind OLS...
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 "divergence" divergence: divergence algorithm with top and bottom kline tolerance regular_bull(series, series, simple, simple, simple, simple, simple) regular_bull: regular bull divergence, lower low src but higher low osc Parameters: series : float src: the source series series : float osc: the oscillator index simple : int lbL:...
Library "least_squares_regression" least_squares_regression: Least squares regression algorithm to find the optimal price interval for a given time period basic_lsr(series, series, series) basic_lsr: Basic least squares regression algorithm Parameters: series : int t: time scale value array corresponding to price series : float p: price scale...
Library "simple_squares_regression" simple_squares_regression: simple squares regression algorithm to find the optimal price interval for a given time period basic_ssr(series, series, series) basic_ssr: Basic simple squares regression algorithm Parameters: series : float src: the regression source such as close series : int region_forward: number...
Library "on_balance_volume" on_balance_volume: custom on balance volume obv_diff(string, simple) obv_diff: custom on balance volume diff version Parameters: string : type: the moving average type of on balance volume simple : int len: the moving average length of on balance volume Returns: obv_diff: custom on balance volume diff value ...
Library "moving_average" moving_average: moving average variants variant(string, series, simple) variant: moving average variants Parameters: string : type: type in series : float src: the source series of moving average simple : int len: the length of moving average Returns: float: the moving average variant value
Library "MathProbabilityDistribution" Probability Distribution Functions. name(idx) Indexed names helper function. Parameters: idx : int, position in the range (0, 6). Returns: string, distribution name. usage: .name(1) Notes: (0) => 'StdNormal' (1) => 'Normal' (2) => 'Skew Normal' (3) => 'Student T' (4) => 'Skew Student T' (5)...
Library "MovingAverages" Contains utilities for generating moving average values including getting a moving average by name and a function for generating a Volume-Adjusted WMA. sma(_D, _len) Simple Moving Avereage Parameters: _D : The series to measure from. _len : The number of bars to measure with. ema(_D, _len) Exponential Moving...
Library "eStrategy" Library contains methods which can help build custom strategy for continuous investment plans and also compare it with systematic buy and hold. sip(startYear, initialDeposit, depositFrequency, recurringDeposit, buyPrice) Depicts systematic buy and hold over period of time Parameters: startYear : Year on which SIP is started ...
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 "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