Here I propose a simple trend following system, where one can ride out moves in a trending direction and use it to reenter the trades in the direction of the trend. This band is also capable of tracking down the strength of the price action, there will be a real indication of compression in price movement and expansion. These zones usually blow traders' accounts...
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...
The new array feature is extremely powerful, as it will allow pinescript users to do more complex things, or compute existing calculations more efficiently, it will also be possible to shine some light to some already existing functions, one of them being percentile_nearest_rank . We have been working on this new feature with our pal alexgrover, and made this...
Using the new 'pinescript' array support to build an High/Low tunnel meter. Using the Array to save only X HIGHEST HIGHS and Y LOWEST LOWS. By the X and Y i build a tunnel - X is the top line (highs) and Y bottom line (lows) Green - Up Trending Red - Down Trending Yellow - Reversal / drawback might occur.
Description: A Function that returns the flat index of a N dimensions array. Inputs: _indices: Array containing dimension indices.¹ _limits: Array containing dimension size.¹ Note: ¹: _indices and _limits size must match. indices must be within dimension size. Outputs: _offset: the flat 1D index. Resources: eli.thegreenplace.net
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.