Library "FunctionBestFitFrequency" TODO: add library description here array_moving_average(sample, length, ommit_initial, fillna) Moving Average values for selected data. Parameters: sample : float array, sample data values. length : int, length to smooth the data. ommit_initial : bool, default=true, ommit values at the start of the data under the...
Library "ArrayStatistics" Statistic Functions using arrays. rms(sample) Root Mean Squared Parameters: sample : float array, data sample points. Returns: float skewness_pearson1(sample) Pearson's 1st Coefficient of Skewness. Parameters: sample : float array, data sample. Returns: float skewness_pearson2(sample) Pearson's 2nd Coefficient of...
Library "ta" █ OVERVIEW This library holds technical analysis functions calculating values for which no Pine built-in exists. Look first. Then leap. █ FUNCTIONS cagr(entryTime, entryPrice, exitTime, exitPrice) It calculates the "Compound Annual Growth Rate" between two points in time. The CAGR is a notional, annualized growth rate that...
Library "Probability" erf(value) Complementary error function Parameters: value : float, value to test. Returns: float ierf_mcgiles(value) Computes the inverse error function using the Mc Giles method, sacrifices accuracy for speed. Parameters: value : float, -1.0 >= _value >= 1.0 range, value to test. Returns: float ierf_double(value) ...
Library "MathStatisticsKernelDensityEstimation" (KDE) Method for Kernel Density Estimation kde(observations, kernel, bandwidth, nsteps) Parameters: observations : float array, sample data. kernel : string, the kernel to use, default='gaussian', options='uniform', 'triangle', 'epanechnikov', 'quartic', 'triweight', 'gaussian', 'cosine', 'logistic',...
Library "MathStatisticsKernelFunctions" TODO: add library description here uniform(distance, bandwidth) Uniform kernel. Parameters: distance : float, distance to kernel origin. bandwidth : float, default=1.0, bandwidth limiter to weight the kernel. Returns: float. triangular(distance, bandwidth) Triangular kernel. Parameters: distance : float,...
Library "MathSearchDijkstra" Shortest Path Tree Search Methods using Dijkstra Algorithm. min_distance(distances, flagged_vertices) Find the lowest cost/distance. Parameters: distances : float array, data set with distance costs to start index. flagged_vertices : bool array, data set with visited vertices flags. Returns: int, lowest cost/distance...
Library "MathFinancialAbsoluteRiskMeasures" Financial Absolute Risk Measures. gain_stdev(sample) Standard deviation of gains in a data sample. Parameters: sample : float array, data sample. Returns: float. loss_stdev(sample) Standard deviation of losses in a data sample. Parameters: sample : float array, data sample. Returns: float. ...
Library "SignalProcessingClusteringKMeans" K-Means Clustering Method. nearest(point_x, point_y, centers_x, centers_y) finds the nearest center to a point and returns its distance and center index. Parameters: point_x : float, x coordinate of point. point_y : float, y coordinate of point. centers_x : float array, x coordinates of cluster centers. ...
Library "AnalysisInterpolationLoess" LOESS, local weighted Smoothing function. loess(sample_x, sample_y, point_span) LOESS, local weighted Smoothing function. Parameters: sample_x : int array, x values. sample_y : float array, y values. point_span : int, local point interval span. aloess(sample_x, sample_y, point_span) aLOESS, adaptive local...
Library "Matrix_Functions_Lib_JD" This is a library to add matrix / 2D array functionality to Pinescript. once you import the library at the beginning of your script, you can add all the functions described below just by calling them like you do any other built'in function. Enjoy, Gr, JD. PS. if you find functionality or calculation errors in the functions,...
// v4 // continuation of prime number checker with strat commands and normal distribution theory put in //pump/dump trend following strategy idea added. //Pseudo Random Number Generator Box Muller Normal Distribution Method - code from Function - Functions to generate Random values by RicardoSantos. Dots are calculated by an adaptation of the ideas //in this...
This is not a foolproof method for finding every prime number but will work well on assets $10 to $100. I will be working on something more robust with scaling for all assets. If you want a main pane indicator with just the background coloring keep the indicator as it is. If you want a lower pane indicator get rid of the current study function and replace with the...
This script calculates and displays some bar statistics. For the bar length statistics, it takes every length of upper or lower movements and calculates their average (with SD), median, and max. That way, you can see whether there is a bias in the market or not. Eg.: If for 10 bars, the market moved 2 up, then 1 down, then 3 up, then 2 down, and 2 up, the...
Functions to handle Box-Cox Transform from sample data.
QUANTILE ESTIMATORS Weighted Harrell-Davis Quantile Estimator with Absolute Deviation Fences. DISCLAIMER: The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets. The following...
Function to create a array from a sample taken from a series (ex:. close, hlc3...).
Displays volume data in panel on bottom right of screen. Shows current bar, change from last bar and average of last 20 bars. This number can be changed in settings if you wish to have the average calculated on a different amount of bars.