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...
Library "FunctionGeometricLineDrawings" array_delete_all_lines(lines) deletes all lines in array. Parameters: lines : line array, array with line objects to delete. Returns: void. triangle(sample_x, sample_y, xloc, extend, color, style, width) Draw a Triangle with 3 vector2D(x, y) coordinates. Parameters: sample_x : int array, triangle...
This is same as existing zigzag library with respect to functionality. But, there is a small update with respect to how arrays are used internally. This also leads to issues with backward compatibility. Hence I decided to make this as new library instead of updating the older one. Below are the major changes: Earlier version uses array.unshift for adding...
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 "MA_library" OVERVIEW This library contains moving average functions that calculate values for which they do not exist by default in PineScript Functions tema(source,length) : Triple Exponencial Moving Average dema(source,length) : Double Exponencial Moving Average wwma(source,length) : Welles Wilder Moving Average gma(source,length) :...
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 "TimeframeToMinutes" The timeframeToMinutes() function returns the number of minutes in an arbitrary timeframe string. timeframeToMinutes() Returns the number of minutes in the supplied timeframe string, which is arbitrary, i.e. it doesn't have to be the timeframe of the current chart but can be taken from an input. The sole advantage over the short...
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 "Labels" Functions to create labels, from simple to complex. labelSimple() Creates a label each time a condition is true. All label parameters can be customised. _condition The condition which must evaluate true for the label to be printed. _x The x location. _y The y location. _text The text to print on the label. _color The...
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 "raf_BollingerBandsSqueezy" B Bands with some squeese indicating additions bbands_lines() Calcs BB Returns: the tree lines, upper, basis and lower bbands_fast_ma() calcs the fast moving average, to be used to compare how prise is positioned against BB Returns: the fast EMA line, and the difference between it and the BB basis line ...
Here is an extensive library on different variations of supertrend. Library "supertrend" supertrend : Library dedicated to different variations of supertrend supertrend_atr(length, multiplier, atrMaType, source, highSource, lowSource, waitForClose, delayed) supertrend_atr: Simple supertrend based on atr but also takes into consideration of custom MA Type,...
Library "Algomojo" This library brings faster access to Automate trades. It simplifies the execution rules and helps traders to implement faster algo trading strategies. algomodule()