Library "FunctionProbabilityDistributionSampling" Methods for probability distribution sampling selection. sample(probabilities) Computes a random selected index from a probability distribution. Parameters: probabilities : float array, probabilities of sample. Returns: int.
Library "FunctionElementsInArray" Methods to count number of elements in arrays count_float(sample, value) Counts the number of elements equal to provided value in array. Parameters: sample : float array, sample data to process. value : float value to check for equality. Returns: int. count_int(sample, value) Counts the number of elements...
Library "LinearRegressionLibrary" contains functions for fitting a regression line to the time series by means of different models, as well as functions for estimating the accuracy of the fit. Linear regression algorithms: RepeatedMedian(y, n, lastBar) applies repeated median regression (robust linear regression algorithm) to the input time series...
Library "FunctionCompoundInterest" Method for compound interest. simple_compound(principal, rate, duration) Computes compound interest for given duration. Parameters: principal : float, the principal or starting value. rate : float, the rate of interest. duration : float, the period of growth. Returns: float. variable_compound(principal,...
Library "FunctionSMCMC" Methods to implement Markov Chain Monte Carlo Simulation (MCMC) markov_chain(weights, actions, target_path, position, last_value) a basic implementation of the markov chain algorithm Parameters: weights : float array, weights of the Markov Chain. actions : float array, actions of the Markov Chain. target_path : float...
This is a public library that include the functions explained below. The libraries are considered public domain code and permission is not required from the author if you reuse these functions in your open-source scripts
Library "LibraryCheckNthBar" TODO: add library description here canwestart(UTC, prd) this function can be used if current bar is in last Nth bar Parameters: UTC : is UTC of the chart prd : is the length of last Nth bar Returns: true if the current bar is in N bar
Library "FunctionDecisionTree" Method to generate decision tree based on weights. decision_tree(weights, depth) Method to generate decision tree based on weights. Parameters: weights : float array, weights for decision consideration. depth : int, depth of the tree. Returns: int array
Library "FunctionDaysInMonth" Method to find the number of days in a given month of year. days_in_month(year, month) Method to find the number of days in a given month of year. Parameters: year : int, year of month, so we know if year is a leap year or not. month : int, month number. Returns: int
Library "FunctionForecastLinear" Method for linear Forecast, same as found in excel and other sheet packages. forecast(sample_x, sample_y, target_x) linear forecast method. Parameters: sample_x : float array, sample data X value. sample_y : float array, sample data Y value. target_x : float, target X to get Y forecast value. Returns: float
Library "FunctionBoxCoxTransform" Methods to compute the Box-Cox Transformer. regular(sample, lambda) Regular transform. Parameters: sample : float array, sample data values. lambda : float, scaling factor. Returns: float array. inverse(sample, lambda) Regular transform. Parameters: sample : float array, sample data values. ...
Library "FunctionPolynomialRegression" TODO: polyreg(sample_x, sample_y) Method to return a polynomial regression channel using (X,Y) sample points. Parameters: sample_x : float array, sample data X points. sample_y : float array, sample data Y points. Returns: tuple with: _predictions: Array with adjusted Y values. _max_dev: Max...
Library "FunctionLinearRegression" Method for Linear Regression using array sample points. linreg(sample_x, sample_y) Performs Linear Regression over the provided sample points. Parameters: sample_x : float array, sample points X value. sample_y : float array, sample points Y value. Returns: tuple with: _predictions: Array with adjusted Y...
Library "MathSpecialFunctionsDiscreteFourierTransform" Method for Complex Discrete Fourier Transform (DFT). dft(inputs, inverse) Complex Discrete Fourier Transform (DFT). Parameters: inputs : float array, pseudo complex array of paired values . inverse : bool, invert the transformation. Returns: float array, pseudo complex array of paired values .
Library "MathComplexEvaluate" TODO: add library description here is_op(char) Check if char is a operator. Parameters: char : string, 1 character string. Returns: bool. operator(op, left, right) operation between left and right values. Parameters: op : string, operator string character. left : float, left value of operation. right : float,...
Library "MathComplexTrignometry" Methods for complex number trignometry operations. sinh(complex) Hyperbolic Sine of complex number. Parameters: complex : float array, complex number. Returns: float array. cosh(complex) Hyperbolic cosine of complex number. Parameters: complex : float array, complex number. Returns: float array. tanh(complex)...
Library "MathComplexExtension" A set of utility functions to handle complex numbers. get_phase(complex_number, in_radians) The phase value of complex number complex_number. Parameters: complex_number : float array, pseudo complex number in the form of a array . in_radians : boolean, value for the type of angle value, default=true, options=(true:...
Library "MathComplexOperator" A set of utility functions to handle complex numbers. conjugate(complex_number) Computes the conjugate of complex_number by reversing the sign of the imaginary part. Parameters: complex_number : float array, pseudo complex number in the form of a array . Returns: float array, pseudo complex number in the form of a array ...