This is an attempt to create a two dimensional floating point array from the pine single dimension array.
It enables some useful array functions like sorting, when you are trying to keep track of price and location in time or bars and you would like to sort the array.
Other array functions on this array will not work, like average and other statistical functions...
Pinescript - Common Label & Line Array Functions Library by RagingRocketBull 2021
This script provides a library of common array functions for arrays of label and line objects with live testing of all functions.
Using this library you can easily create, update, delete, join label/line object arrays, and get/set properties of individual label/line...
This code may be useful for Pine script coders only.
Arrays were welcomed in Pine script, as they are a foundation for coding properly many useful things, like studies and strategies here in TradingView :)
TradingView recently released new functions for arrays, like array.median and more, but the "PRODUCT" function was still missing, so I created it....
Standard Array Functions Library by RagingRocketBull 2021
This script provides a library of every standard Pinescript array function for live testing with all supported array types.
You can find the full list of supported standard array functions below.
There are several libraries:
- Common String Functions Library
- Common Array Functions Library
This script calculates the covariance and correlation coefficient between two markets using arrays.
Lookback: How many bars to perform the calculation on.
Source: Price source to calculate the correlation on.
Reference Market: The reference market to compare to the current market.
It's a simple indicator, but very useful for determining how correlated your...
This is just a script to exercise the use of arrays on pine script.
I think we could say that every for loop we had in pine script before the arrays, is eligible to become an array.
Our script will get more efficient and more reliable.
As every "if" case is elegible to became a function
I confess I was addicted to use if, else if, else in my codes, but recently...
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...
In this study, I present a method to expose NaN values to development environment.
This exposure allows NaN values to be used by methods in scripts.
I also show how to use values, even NaN values, as anchors from...
Recently we got new features in Pine such Arrays of Lines, Labels and Strings. Thanks to the Pine Team! ( here )
So I decided to make new style of Multi Time Frame indicator and I used Array of Lines in this script. here it is, RSI Multi Time Frame script. it shows RSI for current time frame as it is and also it gets RSI for the Higher Time...
What is a Pivot Point?
A pivot point is a technical analysis indicator used to determine the overall trend of the market over different time frames. A pivot point is calculated based on the high, low, and closing prices of previous trading session/day and support and resistance levels that are projected based on the pivot point calculation as well as type of the...
First all of thanks to LonesomeTheBlue for making me grasp arrays, a wonderful addition to Pine Script.
This indicator uses arrays to find Pivot Points and mark them as Support / Resistance.
It displays an info panel with the latest values.
This code was written using the following standards:
• PineCoders Coding Conventions for Pine:...
Having Fun with Arrays.
I couldn't load all of the images into their respective arrays without getting an "Internal Pine error" So I commented out some of them. You can pop them back in, but make sure to disable another in its place.
Calcuating SMA on an Array
In this script i show you how to calculate SMA on an array.
Several values are plotted just for illustration.
Steps to follow:
- make sure you have an array with values (source array)
- create a blank array (pref. with the same size)
- call the function array_sma
This function fills the empty array with the SMA values of the source array.
Experimental attemt of applying Logistic Map Equation for some of widly used indicators.
With this study "Awesome Oscillator (AO)", "Rate of Change (ROC)", "Relative Strength Index (RSI)", "Stochastic (STOCH)" and a custom interpretation of Logistic Map Equation is presented
Calculations with Logistic Map Equation makes sense when the calculated results...
Yet another Array indicator, simple, but efficient which i call ADO. The indicator acts as a COUNTER of when CLOSE closes above OPEN and vice versa based on specified look back period in settings.
If we have more Closes above Opens, obviously the indicator will be above ZERO and GREEN, otherwise RED.
Optional to smooth it by EMA (true by default).
Like if you...