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
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...
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...
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 an experimental study designed to calculate polynomial regression for any order polynomial that TV is able to support.
This study aims to educate users on polynomial curve fitting, and the derivation process of Least Squares Moving Averages (LSMAs).
I also designed this study with the intent of showcasing some of the capabilities and potential applications...
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...
A Function that returns the flat index of a N dimensions array.
_indices: Array containing dimension indices.¹
_limits: Array containing dimension size.¹
¹: _indices and _limits size must match. indices must be within dimension size.
_offset: the flat 1D index.
This is an experimental study designed to filter out minor price action for a clearer view of trends.
Inspired by the QQE's volatility filter, this filter applies the process directly to price rather than to a smoothed RSI.
First, a smooth average price range is calculated for the basis of the filter and multiplied by a specified amount.
Next, the filter is...
This is an experimental study that calculates filter values at user defined sample rates.
This study is aimed to provide users with alternative functions for filtering price at custom sample rates.
First, source data is resampled using the desired rate and cycle offset. The highest possible rate is 1 bar per sample (BPS).
There are three resampling methods to...
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.
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...
With the arrival of the blessed gifts of arrays from TV, I now present the REAL "Truncated Bandpass Filter" indicator employing PSv4.0 upon initial release, originally formulated by the magnificent mathemagician Dr. John Ehlers for TASC - July 2020 Traders Tips. Don't be bamboozled by the other incorrect truncated bandpass filters found on TV, those published with...
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 following script is an application of the Z-Score (previous script).
Z-Scores can be used in place of standard deviation (sigma) in 'Bollinger Bands'.
The average of the sample (x-bar) over 21 days (N)
21 average trading days per month, fixed value
The average of the population (mu) over 63 days (n)
63 days per quarter, default is set to 63