Library "HarmonicPatternTracking" Library contains few data structures and methods for tracking harmonic pattern trades via pinescript. method draw(this) Creates and draws HarmonicDrawing object for given HarmonicPattern Namespace types: HarmonicPattern Parameters: this (HarmonicPattern) : HarmonicPattern object Returns: current HarmonicPattern...
📕 LIBRARY OHLC 🔷 Introduction This library is a custom library designed to work with real-time bars. It allows to easily calculate OHLC values for any source. Personally, I use this library to accurately display the highest and lowest values on visual indicators such as my progress bars. 🔷 How to Use ◼ 1. Import the OHLC library into your TradingView...
Library "MarkovChain" Generic Markov Chain type functions. --- A Markov chain or Markov process is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. --- reference: Understanding Markov Chains, Examples and Applications. Second Edition. Book by Nicolas...
Library "FunctionProbabilityViterbi" The Viterbi Algorithm calculates the most likely sequence of hidden states *(called Viterbi path)* that results in a sequence of observed events. viterbi(observations, transitions, emissions, initial_distribution) Calculate most probable path in a Markov model. Parameters: observations (int ) : array ....
Library "FunctionBaumWelch" Baum-Welch Algorithm, also known as Forward-Backward Algorithm, uses the well known EM algorithm to find the maximum likelihood estimate of the parameters of a hidden Markov model given a set of observed feature vectors. --- ### Function List: > `forward (array pi, matrix a, matrix b, array obs)` > `forward (array pi, matrix a,...
Commission-aware Trade Labels Description: This library provides an easy way to visualize take-profit and stop-loss levels on your chart, taking into account trading commissions. The library calculates and displays the net profit or loss, along with other useful information such as risk/reward ratio, shares, and position size. Features: Configurable...
Library "Bitwise, Encode, Decode" Bitwise, Encode, Decode, and more Library docs() Hover-Over Documentation for inside Text Editor bAnd(a, b) Returns the bitwise AND of two integers Parameters: a : `int` - The first integer b : `int` - The second integer Returns: `int` - The bitwise AND of the two integers bOr(a, b) Performs a...
Library "DataChart" Library to plot scatterplot or heatmaps for your own set of data samples draw(this) draw contents of the chart object Parameters: this : Chart object Returns: current chart object init(this) Initialize Chart object. Parameters: this : Chart object to be initialized Returns: current chart object addSample(this,...
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 🎲...