Library "CalulateWinLoss" TODO: add library description here colorwhitered(x) TODO: add function description here Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns colorredwhite() cal()
Library "FunctionPatternFrequency" Counts the word or integer number pattern frequency on a array. reference: rosettacode.org count(pattern) counts the number a pattern is repeated. Parameters: pattern : : array : array with patterns to be counted. Returns: array : list of unique patterns. array : list of counters per...
Library "DatasetWeatherTokyoMeanAirTemperature" Provides a data set of the monthly mean air temperature (°C) for the city of Tokyo in Japan. this was just for fun, no financial implications in this. reference: www.data.jma.go.jp TOKYO WMO Station ID:47662 Lat 35o41.5'N Lon 139o45.0'E year_() the years of the data set. Returns: array : year values. ...
Library "FunctionDynamicTimeWarping" "In time series analysis, dynamic time warping (DTW) is an algorithm for measuring similarity between two temporal sequences, which may vary in speed. For instance, similarities in walking could be detected using DTW, even if one person was walking faster than the other, or if there were accelerations and decelerations...
Library "FunctionKellyCriterion" Kelly criterion methods. the kelly criterion helps with the decision of how much one should invest in a asset as long as you know the odds and expected return of said asset. simplified(win_p, rr) simplified version of the kelly criterion formula. Parameters: win_p : float, probability of winning. rr : float,...
Library "Adxl" Functions to calculate the Average Directional Index getDirectionUp(bar, lookback) Bar high changed from open for bar Parameters: bar : series int The bar to calculate at lookback : series int The lookback period Returns: series float getDirectionDown(bar, lookback) Bar low changed from open for bar Parameters: bar...
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 ...