Vector Scaler is like Stochastic but it uses a different method to scale the input. The method is very similar to vector normalization but instead of keeping the "vector" we just sum the three points and average them. The blue line is the signal line and the orange line is the smoothed signal line. I have added the "J" line from the KDJ indicator to help spot...
Library "FunctionLAPACKdsyrk" subroutine part of LAPACK: Linear Algebra Package, performs one of the symmetric rank k operations . C := alpha*A*A**T + beta*C, or C := alpha*A**T*A + beta*C, . where alpha and beta are scalars, C is an n by n symmetric matrix and A is an n by k matrix in the first case and a k by n matrix in the second...
Library "FunctionLAPACKdtrsm" subroutine in the LAPACK:linear algebra package, used to solve one of the following matrix equations: op( A )*X = alpha*B, or X*op( A ) = alpha*B, where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of op( A ) = A or op( A ) = A**T. The...
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...
This script uses a reverse function of the famous Ehler Instantaneous Trendline to calculate the source price required in order to change from Bullish to bearish From my analysis, the reverse price does appear to be rather choppy, though it is 100% accurate. This is because Ehler's Instantaneous Trendline tends to remain trending for longer periods of time with...
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 "FunctionArrayUnique" Method for retrieving the unique elements in a array. for example would retrieve a array with , the elements retrieved will be sorted by its first seen index in parent array. note: float values have no precision option. unique(source) method for retrieving the unique elements in a array. Parameters: source : array...
Library "functionStringToMatrix" Provides unbound methods (no error checking) to parse a string into a float or int matrix. to_matrix_float(str, interval_sep, start_tk, end_tk) Parse a string into a float matrix. Parameters: str : , string, the formated string to parse. interval_sep : , string, cell interval separator token. start_tk : ,...
Library "swap" Side / Boundary Based All Types Swapper - three automagical types for Arrays, Matrixes, and Variables -- no signal : Long/ Short position autoswap -- true / false : Boolean based side choice -- Src / Thresh : if source is above or below the threshold - two operating modes for variables, Holding mode only for arrays/matrixes -- with two ...
A Magical little helper friend for Candle Math. When composing scripts, it is often necessary to manipulate the math around the OHLC. At times, you want a scalar (absolute) value others you want a vector (+/-). Sometimes you want the open - close and sometimes you want just the positive number of the body size. You might want it in ticks or you might want it in...
Library "FunctionIntrabarCrossValue" intrabar_cross_value(a, b, step) Find the minimum difference of a intrabar cross and return its median value. Parameters: a : float, series a. b : float, series b. step : float, step to iterate x axis, default=0.01 Returns: float
Library "MathProbabilityDistribution" Probability Distribution Functions. name(idx) Indexed names helper function. Parameters: idx : int, position in the range (0, 6). Returns: string, distribution name. usage: .name(1) Notes: (0) => 'StdNormal' (1) => 'Normal' (2) => 'Skew Normal' (3) => 'Student T' (4) => 'Skew Student T' (5)...
Example overload functions accept loading of _value for types float, int, or string, then positively identifies the actual argument type of that specific loaded _value.
Example function accepts loading of _value for types float, int, or string, then identifies whether the loaded _value is a string number, string, or number.
Custom f_nDecimals() function returns precision of decimal numbers of the following forms: const, input, simple, and series of the following types: float, integer, and string. Error checking is performed for valid numbers and invalid values return NaN. NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any...
Library "FunctionMinkowskiDistance" Method for Minkowski Distance, The Minkowski distance or Minkowski metric is a metric in a normed vector space which can be considered as a generalization of both the Euclidean distance and the Manhattan distance. It is named after the German mathematician Hermann Minkowski. reference: en.wikipedia.org double(point_ax,...
This script plots vertical lines on charts or indicators. Unfortunately pinescript is lacking a vertical line plotting function. Vertical lines are useful to mark events, such as crossover of levels, indicators signals or as a time marker. After searching the internet for a long time and trying different scripts, this script is the simplest and visually the...