Library "BoxLine_Lib" personal Library for line and box built in functions lineXY(x) get x1,y1,x2,y2 in a tuple Parameters: x : TODO: line Returns: tuple of x1,y1,x2,y2 line(x) Create line with only the y1 value(when line == na) or all when line != na set x1,y1,x2,y2 individually just 1 or all - use just the line value to set the x2 to...
Library "HelperFunctions" A collection of my most used functions apply_smoothing() Apply one of Pine Script's built-in smoothing functions to a series
Library "calc" Library for math functions. will expand over time. split(_sumTotal, _divideBy, _forceMinimum, _haltOnError) Split a large number into integer sized chunks Parameters: _sumTotal : (int) Total numbert of items _divideBy : (int) Groups to make _forceMinimum : (bool) force minimum number 1/group _haltOnError : (bool) force...
Library "UtilityFunctions" Utility functions written by me printLabelOnLastBar_string(string) Prints string in a label on the last bar Parameters: string : value to print Returns: void printLabelOnLastBar_float(float) Prints float in a label on the last bar Parameters: float : value to print Returns: void ...
Library "percentageLib" : every thing need anout percentage getPercentage(entry, exit) : get percentage change of of two value Parameters: entry : : value of entry price exit : : value of exit price Returns: : negative or positive value applyPercentageNoAddUp(price, percentage) : apply percentage change on value decrease or...
Library "xor" xor(a, b) xor: Exclusive or, or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). Parameters: a : first argument b : second argument Returns: returns xor (true only if a and b are true, but not both) Example: true xor true = false true xor false =...
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...