Library "Moving_Averages" This library contains majority important moving average functions with int series support. Which means that they can be used with variable length input. For conventional use, please use tradingview built-in ta functions for moving averages as they are more precise. I'll use functions in this library for my other scripts with dynamic...
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 "table_library" TODO: With this library, you can add tables to your strategies. strategy_table() Returns: Strategy Profit Table Adds a table to the graph of the strategy for which you are calling the function. You can see data such as net profit in this table. No parameters. Just call the function inside the strategy. Example Code : import...
Library "AutoFiboRetrace" TODO: add library description here fun(x) TODO: add function description here Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns
Library "honestpersonallibrary" thestratnumber() this will return the number 1,2 or 3 using the logic from Rob Smiths #thestrat which uses these type of bars for setups getBodySize() Gets the current candle's body size (in POINTS, divide by 10 to get pips) Returns: The current candle's body size in POINTS getTopWickSize() Gets the current candle's...
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 "OrdinaryLeastSquares" One of the most common ways to estimate the coefficients for a linear regression is to use the Ordinary Least Squares (OLS) method. This library implements OLS in pine. This implementation can be used to fit a linear regression of multiple independent variables onto one dependent variable, as long as the assumptions behind OLS...
Library "FunctionMatrixSolve" Matrix Equation solution for Ax = B, finds the value of x. solve(A, B) Solves Matrix Equation for Ax = B, finds value for x. Parameters: A : matrix, Square matrix with data values. B : matrix, One column matrix with data values. Returns: matrix with X, x = A^-1 b, assuming A is square and has full...
Library "FunctionPolynomialFit" Performs Polynomial Regression fit to data. In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modelled as an nth degree polynomial in x. reference: en.wikipedia.org www.bragitoff.com gauss_elimination(A, m, n) ...
Collection of Dominant Cycle estimators. Length adaptation used in the Adaptive Moving Averages and the Adaptive Oscillators try to follow price movements and accelerate/decelerate accordingly (usually quite rapidly with a huge range). Cycle estimators, on the other hand, try to measure the cycle period of the current market, which does not reflect price movement...
Library "least_squares_regression" least_squares_regression: Least squares regression algorithm to find the optimal price interval for a given time period basic_lsr(series, series, series) basic_lsr: Basic least squares regression algorithm Parameters: series : int t: time scale value array corresponding to price series : float p: price scale...
Library "simple_squares_regression" simple_squares_regression: simple squares regression algorithm to find the optimal price interval for a given time period basic_ssr(series, series, series) basic_ssr: Basic simple squares regression algorithm Parameters: series : float src: the regression source such as close series : int region_forward: number...
Library "on_balance_volume" on_balance_volume: custom on balance volume obv_diff(string, simple) obv_diff: custom on balance volume diff version Parameters: string : type: the moving average type of on balance volume simple : int len: the moving average length of on balance volume Returns: obv_diff: custom on balance volume diff value ...
Library "moving_average" moving_average: moving average variants variant(string, series, simple) variant: moving average variants Parameters: string : type: type in series : float src: the source series of moving average simple : int len: the length of moving average Returns: float: the moving average variant value
Library "NormalizedOscillators" Collection of some common Oscillators. All are zero-mean and normalized to fit in the -1..1 range. Some are modified, so that the internal smoothing function could be configurable (for example, to enable Hann Windowing, that John F. Ehlers uses frequently). Some are modified for other reasons (see comments in the code), but never...
Library "CommonFilters" Collection of some common Filters and Moving Averages. This collection is not encyclopaedic, but to declutter my other scripts. Suggestions are welcome, though. Many filters here are based on the work of John F. Ehlers sma(src, len) Simple Moving Average Parameters: src : Series to use len : Filtering length Returns:...
Library "math_utils" Collection of math functions that are not part of the standard math library num_of_non_decimal_digits(number) num_of_non_decimal_digits - The number of the most significant digits on the left of the dot Parameters: number : - The floating point number Returns: number of non digits num_of_decimal_digits(number) ...
█ OVERVIEW This library is a Pine Script™ programmer’s tool containing functions that average values selectively. █ CONCEPTS Averaging can be useful to smooth out unstable readings in the data set, provide a benchmark to see the underlying trend of the data, or to provide a general expectancy of values in establishing a central tendency. Conventional...