This is an educational script about utilizing array function in pine script. The provided example within records the opening price of days or weeks and can be plotted on lower timeframes. It may or may not be useful. Further information is provided inside the source code.
About Clear Method -- to repeat my prior post on the bar painter script: This indicator is translated out of Technical Analysis of Stocks & Commodities , September 2010, (I take zero design credit). The script simply looks for the price action to break or "clear" the most recent action, and only changes the paintbar color if the action indeed clears the previous...
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 map in pine-script via drawings. There are few restrictions with them: 1. The size of the map cannot be more that amount of allowed drawings (about 40 by now) 2. Because the map shares the space of drawings throughout the whole script, using drawings with the map must be careful, with handly creating and removing of each drawing,...
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
returns the value at index, can be used if you want to compare/select multiple values from different series and need to simulate a array/enumerator.