Library "BinaryInsertionSort" Library containing functions which can help create sorted array based on binary insertion sort. This sorting will be quicker than array.sort function if the sorting needs to be done on every bar and the size of the array is comparatively big. method binary_search_basic(sortedArray, item, order) binary_search_basic - finds the...
Library "analytics_tables" 📝 Description This library provides the implementation of several performance-related statistics and metrics, presented in the form of tables. The metrics shown in the afforementioned tables where developed during the past years of my in-depth analalysis of various strategies in an atempt to reason about the performance of each...
The "Iterator" library is designed to provide a flexible way to work with sequences of values. This library offers a set of functions to create and manage iterators for various data types, including integers, floats, and more. Whether you need to generate an array of values with specific increments or iterate over elements in reverse order, this library has you...
Library "lib_no_delay" This library contains modifications to standard functions that return na before reaching the bar of their 'length' parameter. That is because they do not compromise speed at current time for correct results in the past. This is good for live trading in short timeframes but killing applications on Monthly / Weekly timeframes if...
The Time Zone Corrector library provides a utility function designed to adjust time based on the user's current time zone. This library supports a wide range of time zones across the Americas, Europe, Asia, and Oceania, making it highly versatile for traders around the world. It simulates a switch-case structure using ternary operators to output the appropriate...
Library "LibraryBitwiseOperands" Description: When you need more space for your data you can use bitwise operations. For example if you are creating an Order Block indicator and you have multiple types then you can define variables for each type with only one bit set like these: const int TYPE_OB = 1 const int TYPE_HH = 2 const int TYPE_LH = 4 const int...
Library "Spectrum" This library includes spectrum analysis tools such as the Fast Fourier Transform (FFT). method toComplex(data, polar) Creates an array of complex type objects from a float type array. Namespace types: array Parameters: data (array) : The float type array of input data. polar (bool) : Initialization coordinates;...
Library "Graph" Library to collect data and draw scatterplot and heatmap as graph method init(this) Initialise Quadrant Data Namespace types: Quadrant Parameters: this (Quadrant) : Quadrant object that needs to be initialised Returns: current Quadrant object method init(this) Initialise Graph Data Namespace types: Graph Parameters: ...
Library "MarketAnalysis" A collection of frequently used market analysis functions in my scripts. bullFibRet(priceLow, priceHigh, fibLevel) Calculates a bullish fibonacci retracement value. Parameters: priceLow (float) : (float) The lowest price point. priceHigh (float) : (float) The highest price point. fibLevel (float) : (float) The...
Library "Complex" This library includes user-defined complex type, and functions to perform basic arithmetic operations on complex numbers. real(radius, angle) Calculates the real part of a complex number based on its polar coordinates. Parameters: radius (float) angle (float) imag(radius, angle) Calculates the imaginary part of a...
Library "Binary" This library includes functions to convert between decimal and binary numeral formats, and logical and arithmetic operations on binary numbers. method toBin(value) Converts the provided boolean value into binary integers (0 or 1). Namespace types: series bool, simple bool, input bool, const bool Parameters: value (bool) :...
Library "TradingUtils" Utility library for common trading functions calcVariation(price, threshold) Calculates variation of a price based on a threshold Parameters: price (float) : (float) The price to be varied threshold (float) : (float) The threshold for the variation Returns: (float) The varied price sendAlert(action, symbol, orderType,...
Library "MathTransform" Auxiliary functions for transforming data using mathematical and statistical methods scaler_zscore(x, lookback_window) Calculates Z-Score normalization of a series. Parameters: x (float) : : floating point series to normalize lookback_window (int) : : lookback period for calculating mean and standard deviation Returns:...
Library "Cinnamon_BearIndicatorsMALibrary" This is a personal Library of the NON built-in PineScript Moving Average function used to code indicators ma_dema(source, length) Double Exponential Moving Average (DEMA) Parameters: source (simple float) length (simple int) Returns: A double level of smoothing helps to follow price movements more...
Library "FunctionTimeFrequency" Functions to encode time in a normalized space (-0.5, 0.5) that corresponds to the position of the current time in the referrence frequency of time. The purpose of normalizing the time value in this manner is to provide a consistent and easily comparable representation of normalized time that can be used for various calculations...
Library "TRIG" degreesToRadians(degrees) Parameters: degrees (float) radiansToDegrees(radians) Parameters: radians (float) rt_get_angleAlphaFromLine(x1, y1, x2, y2, inDegrees) Parameters: x1 (int) y1 (float) x2 (int) y2 (float) inDegrees (bool) rt_get_angleBetaFromLine(x1, y1, x2, y2)...
Library "ALGEBRA" line_fromXy(x1, y1, x2, y2) Parameters: x1 (int) y1 (float) x2 (int) y2 (float) line_getPrice(x, slope, yInt) Parameters: x (int) slope (float) yInt (float) line_length(x1, y1, x2, y2) Parameters: x1 (int) y1 (float) x2 (int) y2 (float) distance(x1, y1, x2, y2)...
Library "stats" stats factorial(x) factorial Parameters: x (int) standardize(x, length, lengthSmooth) standardize @description Moving Standardization of a time series. Parameters: x (float) length (int) lengthSmooth (int) dnorm(x, mean, sd) dnorm @description Approximation for Normal Density...