This script shows a sample of how to do confidence weighted scoring indicators and for loops with Pine. This indicator may or may not be found useful, it's intent is to provide a sample on how to create such an indicator and use certain Pine features.
- Defined points based on the confidence of RSI and Stochastic indicator
- Defined points based on...
Methods for probability distribution sampling selection.
sample(probabilities) Computes a random selected index from a probability distribution.
probabilities : float array, probabilities of sample.
This is an attempt to create a two dimensional floating point array from the pine single dimension array.
It enables some useful array functions like sorting, when you are trying to keep track of price and location in time or bars and you would like to sort the array.
Other array functions on this array will not work, like average and other statistical functions...