experimental: a basic method to evaluate stock dividend periodicity. known issues: * it does not adapt well to changes in periodicity, if there is a big enough change on the dividend period plan.
Library "ZenLibrary" A collection of custom tools & utility functions commonly used with my scripts. getDecimals() Calculates how many decimals are on the quote price of the current market Returns: The current decimal places on the market quote price truncate(float, float) Truncates (cuts) excess decimal places Parameters: float : _number The...
This is a simple utility which counts the number of bars and time elapsed after starting the script. This can be used in time or bars based conditions to modify script behavior. This particular script does the following: Starts timer when script is added to chart Timer is green when starting and continues to be in green if the right Auth key is used in...
Functions to handle Box-Cox Transform from sample data.
Some functions to handle Arithmetic Geometric Mean.
a function for relative weighted average using arrays
function to get sorted indices from a array using bubble sort.
Function to convert unix time to a datestamp string.
Function to calculate a forecast using a linear regression approach, this is the same function used on excel and other data sheet programs. reference: - support.microsoft.com - stackoverflow.com
Function to create a array from a sample taken from a series (ex:. close, hlc3...).
An utility function to parse session inputs. Extracts hours, minutes and weekdays (if defined) and returns a tuple as the result. _parseSession(sessionString) => (hourStart, minuteStart, hourEnd, minuteEnd, weekdaysArray) Examples presented on the chart.
Basic utility script to keep track of key dates & expiries.
When designing filters it can be interesting to have information about their characteristics, which can be obtained from the set of filter coefficients (weights). The following script analyzes the impulse response of a filter in order to return the following information: Lag Smoothness via the Herfindahl index Percentage Overshoot Percentage Of Positive...
Introduction Bands and trailing stops are important indicators in technical analysis, while we could think that both are different they can be in fact closely related, at least in the way they are made. Bands and trailing stops can be made from a simple central tendency estimator, like a moving average, and from a volatility estimator like standard deviation,...
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
This simple script checks for data gaps in an intra-day TradingView chart. I have found that BitMEX 1-minute data is coming in rather holey lately, so I wrote this just to see how prevalent the problem is. It should work on any intra-day timeframe, not just 1-minute. V1: initial release.
3 Moving Average Lines. All parameters are configurable via user input. Each of these moving average lines already exist as individual indicators in TradingView. This script just bundles them for one stop shopping. It's helpful if you're limited by the number of indicators per chart. And highly educational: quickly compare the different averaging methods! sma:...
A simple function method to build color gradient palettes to use in scripts