Library "FFTLibrary" contains a function for performing Fast Fourier Transform (FFT) along with a few helper functions. In general, FFT is defined for complex inputs and outputs. The real and imaginary parts of formally complex data are treated as separate arrays (denoted as x and y). For real-valued data, the array of imaginary parts should be filled with...

33

Simple indicator designed as filter so you can easily see how the currency or asset performed during each month historically. Can used to identify a possible month to enter or exit a trade in. For best results use in combination with another indicator or candle pattern to signal an entry in a historically bullish month *This indicator is designed to be used only...

105

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...

43

// 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...

90

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,...

19

I did not write the script from scratch but rather started editing code of an existing one. The original code came from a script called GAP DETECTOR by @Asch- First up: I am a trader, not a programmer and therefore my code most likely is inefficient. If someone with more expertise would like to help and optimize it - feel free to get in touch, I am always...

132

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. ...

39

This script holds several useful functions from statistics and machine learning (ML) and takes measurement of a volume weighted distance in order to identify local trends. It attempts at applying ML techniques to time series processing, shows how different distance measures behave and gives you an arsenal of tools for your endeavors. Tested with BTCUSD. REM:...

195

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',...

28

Level: 1 Background A histogram is a special chart that is applied to statistical data that is divided into numerically ordered groups. For example groups with close relationships in the vicinity like "Close-ref(Close ,1)", "Close-ref(Close,2)" and so on. A histogram provides a snapshot of all the data so that you can quickly get an overview of the historical...

71

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...

25

Library "pNRTR" Provides functions for calculating Nick Rypock Trailing Reverse (NRTR) trend values with higher precision offsets for both low, and high points rather than the standard single offset. pnrtr(float low_offset = 0.2, float high_offset = 0.2, float value = close) low_offset Offset used for nrtr low_point calculations. Default is 0.2. ...

22

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...

39

Managing expectation is important for price action traders. This indicator mainly for intraday reference, and it plots the price change/ volatility statistics on a bar-to-bar basis, with the marking of +/- 1 and 2 sigma SD . The user can refer to the historical volatility to manage their expectation of the velocity of price action by referring to these statistics.

35

Library "DataCleaner" Functions for acquiring outlier levels and acquiring a cleaned version of a series. outlierLevel(src, len, level) Gets the (standard deviation) outlier level for a given series. Parameters: src : The series to average and add a multiple of the standard deviation to. len : The The number of bars to measure. level : The...

15

The z-score is a way of counting the number of standard deviations between a given data value and the mean of the data set. Z-score = (x̄ - μ) / (σ / √ n) x̄ = sample mean (using the array.avg function = array(a,close ), where i = 1 to 21) μ = population mean ( = avg(close, n)) σ = standard deviation of the population ( = stdev(close,n)) n = number of 'close'...

73

Good morning traders! This time I want to share with you a little script that, thanks to the use of arrays, allows you to have interesting statistical and financial insights taken from the symbol on chart and compared to those of another symbol you desire (in this case the metrics taken from the perpetual future ETHUSDT are compared to those taken from the...

35

This is a very simple script... it does not necessarily create signals. It only provides useful feedback via statistics & probability. There will be a green background if there are two green bars in a row, and it will stay green until two red bars show up (in which it switches color to red until two green bars show up again). The fuchsia arrows show the double...

148