a function for relative weighted average using arrays
Pinescript - Common Label & Line Array Functions Library by RagingRocketBull 2021 Version 1.0 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...
Standard Array Functions Library by RagingRocketBull 2021 Version 1.0 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...
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...
Using the new Pine Script array built-ins to join string elements together for label text. The array is sliced to remove extraneous elements.
Hello Traders, 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:...
A low cost function to down sample a array. specially useful for pattern recognition algorithms.
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. Vader Pine Logo &hearts Bitcoin pAulse
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.
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...
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...
Yet another "Low - High" indicator using the new Pine Script Arrays. The indicator uses the latests Lows and Highs to plot a trend line and reversal/slowdown. More detailed explanation inside the script. Enjoy! Green - Up Trending Red - Down Trending White - Slow Down/Reversal might occur. Made for educational purposes of how to use Arrays, yet can be...
This script extends my other two Array examples (which I've also provided to you open source): The Ticker-centric 5m,15m,45m,1h,4h,1d resolution labels using arrays: And the more Macro VIX,GLD,TLT,QQQ,SPY,IWM 1d resolution labels using arrays: This script aims to show how to use min/max/avg with Arrays easily. My next example after this will be exploring the...
Ever wish you didn't have to rapidly flip between 6 different tickers to get the full picture? Yeah, me too. Do you also wish that you kind of understood how the shift / unshift function works for arrays? Yeah, I did too. Both of those birds are taken care of with one stone! The Macro Consolidated Interval Display uses the new Array structure and security to...
Ever wish you didn't have to rapidly flip between 6 different intervals to get the full picture? Yeah, me too. Do you also wish that you kind of understood how the shift / unshift function works for arrays? Yeah, I did too. Both of those birds are taken care of with one stone! The Consolidated Interval Display uses the new Array structure and security to display...
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 Z-Score...