This is a collection of functions either found on the internet, or made by me. This is only public so my other scripts that reference this can also be public. If you find anything useful for you here, be my guest.
Library "Canvas" A library implementing a kind of "canvas" using a table where each pixel is represented by a table cell and the pixel color by the background color of each cell. To use the library, you need to create a color matrix (represented as an array) and a canvas table. The canvas table is the container of the canvas, and the color matrix determines...
Library "RicardoLibrary" Ricardo's personal Library GetPipValue() GetPipValue Returns: Pip value of Symbol Calculate_SL(IsLong) Calculate_SL: Calcultes Stop Loss Parameters: IsLong : If true, then I am going to enter a long position, if false then Short position Returns: Stop loss Price
Library "STPFunctions" These functions are used as part of the STP trading strategy and include commonly used candle patterns, trade triggers and frequently monitored stock parameters MAs() Determines if the last price is abover or below key moving averages. MAs used on the daily are SMA20, SMA50 and SMA200. SMA20 and SMA50 are used intraday. Returns: 1 if...
Library "mZigzag" Matrix implementation of zigzag to allow further possibilities. Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information Parameters: length...
Library "merge_pinbar" merge_pinbar: merge bars and check whether the bar is a pinbar merge_pinbar(simple, simple) merge_pinbar: merge bars and check whether the bar is a pinbar Parameters: simple : int period: the statistic bar period simple : int max_bars: the max bars to be merged Returns: array:
Library "console" Simple debug console to print messages from your strategy code. USAGE : Make sure your strategy overlay is false Import the library : import keio/console/1 as console init(lines, panes) Initialise function. USAGE : var log = console.init() Parameters: lines : Optional. Number of lines to display panes :...
Library "Timed_exit_alert_for_webhook" TODO: add library description here fun(x) TODO: add function description here Parameters: x : TODO: add parameter x description here Returns: TODO: add what function returns for exiting FCM like Tradovate and AMP using API and python MT5 and Webhooks the writer take no responsibility for trades made using...
Library "_matrix" Library helps visualize matrix as array of arrays and enables users to use array methods such as push, pop, shift, unshift etc along with cleanup activities on drawing objects wherever required unshift(mtx, row) unshift array of lines to first row of the matrix Parameters: mtx : matrix of lines row : array of lines to be...
Library "OrdinaryLeastSquares" One of the most common ways to estimate the coefficients for a linear regression is to use the Ordinary Least Squares (OLS) method. This library implements OLS in pine. This implementation can be used to fit a linear regression of multiple independent variables onto one dependent variable, as long as the assumptions behind OLS...
Library "FunctionMatrixSolve" Matrix Equation solution for Ax = B, finds the value of x. solve(A, B) Solves Matrix Equation for Ax = B, finds value for x. Parameters: A : matrix, Square matrix with data values. B : matrix, One column matrix with data values. Returns: matrix with X, x = A^-1 b, assuming A is square and has full...
Library "FunctionPolynomialFit" Performs Polynomial Regression fit to data. In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modelled as an nth degree polynomial in x. reference: en.wikipedia.org www.bragitoff.com gauss_elimination(A, m, n) ...
Library "TPCThemeBlackAndBlue_Public" Provides calculated colors. colorPrimary() colorSecondary() colorTertiary() labelBgColor() lHP() lHS() lHT() lV()
Library "TPCColors_Public" Provides calculated colors. get(colorKey, colorModifier) Returns the length in ms for the given amount of the given interval. Parameters: colorKey : Color name, for example "black", "red", or "greenDark" colorModifier : Color modifier, for example "lightX", "light", or "dark" Returns: The calculated color.
Library "TPCLines_Public" Helpers for lines lineVA(start, lines, labels, lineColor, labelBgColor, labelTextColor, highPrice, lowPrice, extend, style, width, labelText, labelSize, labelStyle, labelTextAlign, bi) Draws a vertical line and optional label on the chart. Parameters: start : The start bar index or time. lines : Line array to which the...
Library "TPLibPriceConversions_Public" toTicks() formatTicks()
Library "TPCTime_Public" Helpers for calculating time getTimeOffset(interval, amount) Returns the length in ms for the given amount of the given interval. Parameters: interval : Interval to calculate, for example "D" or "60". amount : Number of intervals for which to calculate the time range in ms. Returns: The number of ms in the amount of the...
Library "LibraryCommon" A collection of custom tools & utility functions commonly used with my scripts @description TODO: add library description here 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...