intrabar_cross_value(a, b, step) Find the minimum difference of a intrabar cross and return its median value.
a : float, series a.
b : float, series b.
step : float, step to iterate x axis, default=0.01
A Magical little helper friend for Candle Math.
When composing scripts, it is often necessary to manipulate the math around the OHLC. At times, you want a scalar (absolute) value others you want a vector (+/-). Sometimes you want the open - close and sometimes you want just the positive number of the body size. You might want it in ticks or you might want it in...
This indicator provides some base code for looping over data to identify swings in price action. Full code commentary can be found on the backtest rookies website.
The indicator shall allow users to "analyse" a recent historical candle to detect whether it was a swing point. This will work by inputting a number to select which historical candle you want to...
Hi BIG PLAYERS
Each of us makes mistakes and exceptions confirm the rule.
However, if you disregard the rules of trading, you lose your money - without any ifs and buts!
I have therefore created a reminder label for myself, which trading approaches I always want to stick to. These rules serve me as a guideline when I should trade.
Through the permanent...
A Function that returns cluster centers for given data (X,Y) vector points.
_X: Array containing x data points.¹
_Y: Array containing y data points.¹
_number_of_clusters: number of clusters.
¹: _X and _Y size must match.
_centers_x: Array containing x data points.
"In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of a random variable."
KDE function with optional kernel:
Republishing due to change of function.
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...
Hi fellow traders..
Happy to share a Linear Regression & RSI Multi-Function Custom Screener with Table-Labels...
The Screener scans for Linear Regression 2-SD Breakouts and RSI OB/OS levels for the coded tickers and gives Summary alerts
Uses Tables (dynamica resizing) for the scanner output instead of standard labels!
This Screener cum indicator collection has...
A function that returns a polynomial regression and deviation information for a data set.
_X: Array containing x data points.
_Y: Array containing y data points.
_predictions: Array with adjusted _Y values.
_max_dev: Max deviation from the mean.
_min_dev: Min deviation from the mean.
This script plots vertical lines on charts or indicators. Unfortunately pinescript is lacking a vertical line plotting function. Vertical lines are useful to mark events, such as crossover of levels, indicators signals or as a time marker.
After searching the internet for a long time and trying different scripts, this script is the simplest and visually the...
Calculates weighted mean, variance, standard deviation, MSE and RMSE from time series variables or arrays.
When calculating from arrays, the function expects index 0 to be the most recent sample and weight values.
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.