The methods listed below are designed to obtain descriptive statistics for matrices and vectors. All of them apply to a vector or a matrix as a whole, as well as to a given matrix axis (horizontally or vertically). When applied entirely to an object, these functions return a scalar (singular). When applied to a matrix along any of the axes, a vector is returned.
The general appearance of prototypes:
T vector<T>::Method(const vector<T> &v)
T matrix<T>::Method(const matrix<T> &m)
vector<T> matrix<T>::Method(const matrix<T> &m, const int axis)
The list of methods:
An example of calculating the standard deviation and percentiles for the range of bars (in points) of the current symbol and timeframe is given in the MatrixStdPercentile.mq5 file.
input int BarCount = 1000;
|
Log:
(EURUSD,H1) [[1.00832,1.00808,1.00901,1.00887,1.00728,1.00577,1.00485,1.00652,1.00538,1.00409]
|