functions for shannon's entropy reference: - en.wiktionary.org - machinelearningmastery.com
displays the distribution of the outcome of a event over the last event. similar to this script:
Custom toInteger() function accepts and truncates the following forms: const, input, simple, and series of the following types: float, integer, and string. Special thanks and credit to BeeHolder for idea on using str.format("{0}", string) as workaround for accepting and handling string types! NOTICE: This is an example script and not meant to be used as an...
function to output color from a HSL (hue, saturation, lightness) palette.
a function to find a color value in a triangular gradient.
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.
A function to track maximum profit.
Hello, 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....
This script is a continuation from Duyck's Unicode font function A different approach made on this function to able change font type on a single string Now you can call it as a function to change the font type on every string that you need, either it is for a Label or regular Text Shoutout to @Duyck for his amazing works on this function. Thank you to PineScript...
A user defined function library of probability focused functions.
This is a script to draw a square wave on the chart, with an indicator for current price. Markets undergoing Dow Jones or Wyckoff Accumulation/Distribution cycles tend to move in such waves, and if the period of the cycles are detected, a signal for accumulation/distribution phases can be created as an early warning. Useful inputs: - Average True Range as the...
This is an indicator to draw a sawtooth wave on the chart. It can be a useful perspective, as decaying markets tend to oscillate in reverse sawtooth waves, and bullish markets can oscillate in conventional sawtooth waves. With the right inputs, it can be an early warning signal for potential movements. Something I've noted is that large waves cause a ripple...
I didn't see a public script for drawing a cosine wave on the chart, with slight changes to RicardoSantos' Function Sine Wave Indicator, so I published this as my first script. I hope that is useful.
Example function of a markov chain monte carlo simulation.
"In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of a random variable." from wikipedia.com KDE function with optional kernel: Uniform Triangle Epanechnikov Quartic Triweight Gaussian Cosinus Republishing due to change of function. deprecated script:
"In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of a random variable." from wikipedia.com
Common String Functions Library by RagingRocketBull 2021 Version 1.0 Pinescript now has strong support for arrays with many powerful functions, but still lacks built-in string functions. Luckily you can easily process and manipulate strings using arrays. This script provides a library of common string functions for everyday use, such as: indexOf, substr, replace,...
Method to do a custom switch that can handle int/float/bool/string type conditions using arrays.