Library "FunctionMinkowskiDistance" Method for Minkowski Distance, The Minkowski distance or Minkowski metric is a metric in a normed vector space which can be considered as a generalization of both the Euclidean distance and the Manhattan distance. It is named after the German mathematician Hermann Minkowski. reference: en.wikipedia.org double(point_ax,...
Library "BE_CustomFx_Library" A handful collection of regular functions, Custom Tools & Utility Functions could be used in regular Scripts. hope these functions can be understood by a non programmer like me too. G_TextValOfNumber(ValueToConvert, RequiredDecimalPlaces, BeginingChar, EndChar) Function to return the String Value of Number with decimal precision...
Currently in PineScript you cannot modify global variables in functions because of scope limitations. One way to work around that is to use arrays. This Library simplifies the use of arrays as global variables to make your code look cleaner. If you're coming from other programming languages, I'm sure you will come across this issue in your PineScript journey at...
Library "Pivots" TODO: add library description here pivots(_type, _open, _high, _low, _clsoe) Calculates the pivot point and returns its value. Parameters: _type : Specifies the type of pivot point. _open : The open price _high : The high price _low : The low price _clsoe : The close price Returns: Returns the value of the...
Library "CRCStrings" symbol_ticker() symbol_prefix()
Library "regress" produces the slope (beta), y-intercept (alpha) and coefficient of determination for a linear regression regress(x, y, len) regress: computes alpha, beta, and r^2 for a linear regression of y on x Parameters: x : the explaining (independent) variable y : the dependent variable len : use the most recent "len" values of x and...
On this Library you cand find a shortcut for some indicators and just import them into your source. Each indicator has its own input and output parameters and they are prety much self explanatory. :D This is the list of the present indicators you can use with this library: *Function_Adx() *Function_Atr() *Function_Mfi() ...
The 2 Pole and 3 Pole Super Smoother Filters were developed by John Ehlers and described in "Chapter 13: Super Smother" of his book Cybernetic Analysis for Stocks and Futures . The 2 Pole Smoother is described as being a better approximation of price, whereas the 3 Pole Smoother has superior smoothing. Library "Ehlers_Super_Smoother" Provides the functions to...
Library "pandas_ta" Level: 3 Background Today is the first day of 2022 and happy new year every tradingviewers! May health and wealth go along with you all the time. I use this chance to publish my 1st PINE v5 lib : pandas_ta This is not a piece of cake like thing, which cost me a lot of time and efforts to build this lib. Beyond 300 versions of this...
Library "TimeLockedMA" Library & function(s) which generates a moving average that stays locked to users desired time preference. TODO - Add functionality for more moving average types. IE: smooth, weighted etc... Example: time_locked_ma(close, length=1, timeframe='days', type='ema') Will generate a 1 day exponential moving average that will stay consistent...
Library "FunctionGenerateRandomPointsInShape" Generate random vector points in geometric shape (parallelogram, triangle) random_parallelogram(vector_a, vector_b) Generate random vector point in a parallelogram shape. Parameters: vector_a : float array, vector of (x, y) shape. vector_b : float array, vector of (x, y) shape. Returns: float array,...
Library "FunctionArrayNextPrevious" Methods to iterate through a array by a fixed anchor point. array_next(array, start_index) retrieves the next value of the internal pointer index. Parameters: array : (any array type), array to iterate. start_index : int, anchor index to start indexing. array_previous(array, start_index) retrieves the...
Library "VolatilityChecker" Volatility is judged to be high when the range of one period is greater than the ATR of another period. is_high(_periods, _smooth, _atr_periods, _atr_times) Return true if the volatility is high. Parameters: _periods : Range Period _smooth : Smoothes the range width. _atr_periods : ATR Period _atr_times :...
Library "Ichimoku" Ichimoku Kinko Hyo library calc(conversion, base, lead, displacement1, displacement2) : Calculate the Ichimoku Kinko Hyo values Parameters: conversion : Conversion line' periods base : Base line's periods lead : 2nd Leading line's periods displacement1 : Leading line's offset displacement2 : Lagging line's...
Library "SetSessionTimes" Function to automatically set session times for symbols and eventually timezone. Useful mainly for futures contracts, to differentiate between pit and overnight sessions, and for 24 hours symbols if you want to "create" sessions for them This library only returns correct session times to the calling script and does nothing by itself...
Library "Punchline_Lib" roundSmart(float) Truncates decimal points of a float value based on the amount of digits before the decimal point Parameters: float : _value any number Returns: float tostring_smart(float) converts a float to a string, intelligently cutting off decimal points Parameters: float : _value any number Returns: string
Library "FunctionNNLayer" Generalized Neural Network Layer method. function(inputs, weights, n_nodes, activation_function, bias, alpha, scale) Generalized Layer. Parameters: inputs : float array, input values. weights : float array, weight values. n_nodes : int, number of nodes in layer. activation_function : string, default='sigmoid',...