Library "log" A Library to log and display messages in a table, with different colours. The log consists of 3 columns: Bar Index / Message / Log Credits QuantNomad - for his idea on logging messages as Error/Warnings and displaying the color based on the type of the message setHeader(_t, _location, _header1, _header2, _header3, _halign, _valign, _size) Sets...
Library "PivotPointsDailyTraditional" Provides the traditional daily pivot values and a pivot vacinity function. P(level, daysPrior) Returns the P value. Parameters: level : The level to caclulate. daysPrior : The number of days in the past to do the calculation. R(level, daysPrior) Calculates the R value for a given pivot...
Library "DailyLevels" Functions for acquiring daily timeframe data by number of prior days. openD(daysPrior, spec, res) Gets the open for the number of days prior. Parameters: daysPrior : Number of days back to get the open from. spec : session.regular (default), session.extended or other time spec. res : The resolution (default =...
Library "HurstExponent" Library to calculate Hurst Exponent refactored from Hurst Exponent - Detrended Fluctuation Analysis demean(src) Calculates a series subtracted from the series mean. Parameters: src : The series used to calculate the difference from the mean (e.g. log returns). Returns: The series subtracted from the series mean ...
Library "SessionInfo" Utility functions for session specific information like the bar index of the session. inSession(spec) Returns true if the current bar is in the session specification. Parameters: spec : session.regular (default), session.extended or other time spec. Returns: True if the current is in session; otherwise false. ...
Library "Moments" Based on Moments (Mean,Variance,Skewness,Kurtosis) . Rewritten for Pinescript v5. logReturns(src) Calculates log returns of a series (e.g log percentage change) Parameters: src : Source to use for the returns calculation (e.g. close). Returns: Log percentage returns of a series mean(src, length) Calculates the mean of a...
Library "LabelHelper" Utility for managing active labels on the chart. add(level, txt, labelColor, textColor) For displaying a lable at the last bar. Parameters: level : The value to display the label at. txt : The text to show on the label. labelColor : The color of the label. textColor : The text color of the label. Returns: The...
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:...