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. ...
Library "FunctionArrayMaxSubKadanesAlgorithm" Implements Kadane's maximum sum sub array algorithm. size(samples) Kadanes algorithm. Parameters: samples : float array, sample data values. Returns: float. indices(samples) Kadane's algorithm with indices. Parameters: samples : float array, sample data values. Returns: tuple with format .
Library "cache" A simple cache library to store key value pairs. Fed up of injecting and returning so many values all the time? Want to separate your code and keep it clean? Need to make an expensive calculation and use the results in numerous places? Want to throttle calculations or persist random values across bars or ticks? Then you've come to...
Library "log" Logging library for easily displaying debug, info, warn, error and critical messages. No real need to explain why you might want to use this library! I'm sure you've all experienced the frustration of trying to understand the data state of your scripts... so, enjoy! More on it's way... (Don't forget to check the helpers in the script and the...
Library "customcandles" customcandles: Contains methods which can send custom candlesticks based on the input macandles(maType, length, o, h, l, c) macandles: Provides OHLC of moving average candles Parameters: maType : - Moving average Type. Can be sma, ema, hma, rma, wma, vwma, swma, linreg, median length : - Defaulted to 20. Can chose custom...
Library "DiscordWebhookFunction" discordMarkdown(_str, _italic, _bold, _code, _strike, _under) Convert string to markdown formatting User can combine any function at the same time. Parameters: _str : String input _italic : Italic _bold : Bold _code : Code markdown _strike : Strikethrough _under : Underline Returns: string...
Library "assert" Production ready assertions and auto-reporting for unit testing pine scripts. This library was born from the need to maintain production level stability and catch regressions / bugs early and fast. I hope this help you trust your pine scripts too. More libraries and tools on their way... please follow for more. Please see the script for...
Library "CandleEvaluation" Contains functions to evaluate bullish and bearish, engulfing, and outsized candles. They are different from the built-in indicators from TradingView in that these functions don't evaluate classical patterns composed of multiple candles, and they reflect my own understanding of what is "bullish" and bearish", "engulfing", and...
Library "ArrayMultipleDimensionPrototype" A prototype library for Multiple Dimensional array methods index_md_to_1d() new_float(dimensions, initial_size) Creates a variable size multiple dimension array. Parameters: dimensions : int array, dimensions of array. initial_size : float, default=na, initial value of the array. Returns: float...
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...
Library "LibraryStopwatch" Provides functions to time the execution of a script. When timing scripts, keep in mind that the runtime environment is fluid on TradingView. Different servers or server loads will impact execution time. Look first. Then leap. stopwatchStats() Times the execution of a script. Returns: A tuple of four values:...
Library "lib_Indicators_DT" This library functions returns some Moving averages and indicators. Created it to feed my indicator/strategy "INDICATOR & CONDITIONS COMBINATOR FRAMEWORK v1 " which I will publish it as soon as possible. Credits: Library includes some public indicators, snippets from tradingview & @03.freeman's ("All MAs displayed") scripts. (I...
Library "DrawIndicatorOnTheChart" this library is used to show an indicator (such RSI, CCI, MOM etc) on the main chart with indicator's horizontal lines in a window. Location of the window is calculated dynamically by last price movemements drawIndicator(indicatorName, indicator, indicatorcolor, period, indimax_, indimin_, levels, precision, xlocation) draws...
Library "FunctionArrayReduce" A limited method to reduce a array using a mathematical formula. float_(formula, samples, arguments, initial_value) Method to reduce a array using a mathematical formula. Parameters: formula : string, the mathematical formula, accepts some default name codes (index, output, previous, current, integer index of arguments...
Library "FunctionProbabilityDistributionSampling" Methods for probability distribution sampling selection. sample(probabilities) Computes a random selected index from a probability distribution. Parameters: probabilities : float array, probabilities of sample. Returns: int.
Library "smf" f_strLeft(string, int) Function returning the leftmost `_n` characters in `_str`. Parameters: string : _str: source string. int : _n : number of leftmost characters to return. f_strRight(string, int) Function returning the rightmost `_n` characters in `_str`. Parameters: string : _str: source string. int : _n :...
Library "ZenLibrary" A collection of custom tools & utility functions commonly used with my scripts. getDecimals() Calculates how many decimals are on the quote price of the current market Returns: The current decimal places on the market quote price truncate(float, float) Truncates (cuts) excess decimal places Parameters: float : _number The...