Library "Feature_Scaling" FS: This library helps you scale your data to certain ranges or standarize, normalize, unit scale or min-max scale your data in your prefered way. Mostly used for normalization purposes. minmaxscale(source, min, max, length) minmaxscale: Min-max normalization scales your data to set minimum and maximum range Parameters: ...
Library "TableBuilder" A helper library to make it simpler to create tables in pinescript This is a simple table building library that I created because I personally feel that the built-in table building method is too verbose. It features chaining methods and variable arguments. There are many features that are lacking because the implementation is early,...
Library "SIL" mean_src(x, y) calculates moving average : x is the source of price (OHLC) & y = the lookback period Parameters: x y stan_dev(x, y, z) calculates standard deviation, x = source of price (OHLC), y = the average lookback, z = average given prior two float and intger inputs, call the f_avg_src() function in...
Library "libKageMisc" Kage's Miscelaneous library print(_value) Print a numerical value in a label at last historical bar. Parameters: _value : (float) The value to be printed. Returns: Nothing. barsBackToDate(_year, _month, _day) Get the number of bars we have to go back to get data from a specific date. Parameters: _year : (int) Year...
Library "Liquidationline" f_calculateLeverage(_leverage, _maintainance, _value, _direction) Parameters: _leverage _maintainance _value _direction f_liqline_update(_Liqui_Line, _killonlowhigh) Parameters: _Liqui_Line _killonlowhigh f_liqline_draw(_Liqui_Line, _priceorliq) Parameters: _Liqui_Line ...
Library "Distributions" Library with price distribution zones calculation helpers. Based on research from "Trading Systems and Methods, 5th Edition" by Perry J. Kaufman getZones(h, l, c, window) Returns price distribution zones based on HLC and for some period Parameters: h : high price l : low price c : close price window : period...
Library "PerformanceTable" TODO: add library description here This library was created as a library because adding a performance table to an existing strategy script made the strategy script lengthy and inconvenient to manage. The monthly table script referenced @QuantNomad's code. The performance table script referenced @myncrypto's code. To use, copy and...
Library "MLExtensions" normalizeDeriv(src, quadraticMeanLength) Returns the smoothed hyperbolic tangent of the input series. Parameters: src : The input series (i.e., the first-order derivative for price). quadraticMeanLength : The length of the quadratic mean (RMS). Returns: nDeriv The normalized derivative of the input series. ...
Library "DataCorrelation" Implementation of functions related to data correlation calculations. Formulas have been transformed in such a way that we avoid running loops and instead make use of time series to gradually build the data we need to perform calculation. This allows the calculations to run on unbound series, and/or higher number of samples 🎲...
Library "JeeSauceScripts" getupdnvol() GetTotalUpVolume(upvolume) Parameters: upvolume GetTotalDnVolume(downvolume) Parameters: downvolume GetDelta(totalupvolume, totaldownvolume) Parameters: totalupvolume totaldownvolume GetMaxUpVolume(upvolume) Parameters: upvolume GetMaxDnVolume(downvolume)...
Hello everyone, Here is a perfectly replicated TradingView backtesting engine condensed into a single library function calculated with arrays. It includes TradingView's calculations for Net profit, Total Trades, Percent of Trades Profitable, Profit Factor, Max Drawdown (absolute and percent), and Average Trade (absolute and percent). Here's how TradingView...
This library contains functions that try to analyze trading signals performance. Like the % of average returns after a long or short signal is provided or the number of times that signal was correct, in the inmediate 2 candles after the signal.
Library "Hurst" hurst(length, samples, hi, lo) Estimate the Hurst Exponent using Dubuc's variation method Parameters: length : The length of the history window to use. Large values do not cause lag. samples : The number of scale samples to take within the window. These samples are then used for regression. The minimum value is 2 but 3+ is...
Library "NetLiquidityLibrary" The Net Liquidity Library provides daily values for net liquidity. Net liquidity is measured as Fed Balance Sheet - Treasury General Account - Reverse Repo. Time series for each individual component included too. get_net_liquidity_for_date(t) Function takes date in timestamp form and returns the Net Liquidity value for that...
Library "ReduceSecurityCalls" This library allows you to reduce the number of request.security calls to 1 per symbol per timeframe. Script provides example how to use it with request.security and possible optimisation applied to htf data call. This data can be used to calculate everything you need and more than that (for example you can calculate 4 emas with...
Library "kNN" Collection of experimental kNN functions. This is a work in progress, an improvement upon my original kNN script: The script can be recreated with this library. Unlike the original script, that used multiple arrays, this has been reworked with the new Pine Script matrix features. To make a kNN prediction, the following data should be supplied...
Library "LibIndicadoresUteis" Collection of useful indicators. This collection does not do any type of plotting on the graph, as the methods implemented can and should be used to get the return of mathematical formulas, in a way that speeds up the development of new scripts. The current version contains methods for stochastic return, slow stochastic, IFR,...
Library "Bpa" TODO: library of Brooks Price Action concepts isBreakoutBar(atr, high, low, close, open, tail, size) TODO: check if the bar is a breakout based on the specified conditions Parameters: atr : TODO: atr value high : TODO: high price low : TODO: low price close : TODO: close price open : TODO: open price tail :...