The Liquidity Price Depth Chart is a unique indicator inspired by the visual representation of order book depth charts, highlighting sorted prices from bullish and bearish candles located on the chart's visible range, as well as their degree of liquidity. Note that changing the chart's visible range will recalculate the indicator. 🔶 USAGE The indicator can be...
🔶 OVERVIEW • This educational script will sort an array of tickers alphabetically and place these values in an table , together with the according current price value next to each ticker . 🔶 SORT ALPHABETICALLY 🔹 I. We make a User Defined Type (UDT) obj , with: · ticker - the string name of the ticker · price ...
Library "FunctionArrayUnique" Method for retrieving the unique elements in a array. for example would retrieve a array with , the elements retrieved will be sorted by its first seen index in parent array. note: float values have no precision option. unique(source) method for retrieving the unique elements in a array. Parameters: source : array...
Library "ArrayExtension" Functions to extend Arrays. index_2d_to_1d(dimension_x, dimension_y, index_x, index_y) returns the flatened one dimension index of a two dimension array. Parameters: dimension_x : int, dimension of X. dimension_y : int, dimension of Y. index_x : int, index of X. index_y : int, index of Y. Returns: int, index in 1...
This script displays the close price and 4 sorted moving averages of your choice in a small repositionable panel and, when used on a higher timeframe, warns you when values may be different from actual values in the higher timeframe, inciting you to double check the actual values of the moving averages in the higher timeframe the panel is supposed to reflect. The...
function to get sorted indices from a array using bubble sort.
The selection sort algorithm sorts an array by repeatedly finding the smallest element from unsorted array and pushing it to the beginning. Two subarrays are maintained during the execution of the script. One of the subarrays is in a sorted state while the other is in a sorted state. After each iteration of the for loop the sorted list is searched for the next...
The new feature of arrays allows for a multitude of new possibilities within Pinescript. This script implements a bubble sort function with most probable efficiency of О(n^2) with a best-case being O(n). This sort does not require large amounts of memory to process and has advantages when sorting small lists of data. The main advantages: Bubble sort is an...
This is my "PSv4.0 Limited Array Support Super Hack", derived from MichelT's Workaround for Arrays in pine and Bubble sort script, except this utilizes line.new() to obtain one array with up to 100 indices. I provided functions that may be syntactically comparable in operation to the array class we should get with PSv5.0 when that arrives. I have no clue when...
The script shows a workaround for arrays in pine-script via drawings. There are few restrictions with them: 1. The length of the array cannot be more that amount of allowed drawings (about 40 by now) 2. Because the "array" shares the space of drawings throughout the whole script, using drawings with the "array" must be careful, with handly creating and removing of...
The script shows a workaround for arrays in pine-script via drawings. There are few restrictions with them: 1. The length of the array cannot be more that amount of allowed drawings (about 40 by now) 2. Because the "array" shares the space of drawings throughout the whole script, using drawings with the "array" must be careful, with handly creating and removing of...
Based on Sort pseudo-array v2 by apozdnyakov - fixed issue where if the same number is repeated in the list it gets skipped - replaced hardcoded 10000 and -10000 values with na in case those values are in the list - added sort_all to demonstrate how to sort a list if the length is fixed