Correlate
Compute the cross-correlation of two vectors.
vector vector::Correlate(
|
Parameters
v
[in] Second vector.
mode
[in] The 'mode' parameter determines the linear convolution calculation mode. Value from the ENUM_VECTOR_CONVOLVE enumeration.
Return Value
Cross-correlation of two vectors.
Note
The 'mode' parameter determines the linear convolution calculation mode.
A simple algorithm for calculating the correlation coefficient of two vectors using MQL5:
vector VectorCrossCorrelationFull(const vector& a,const vector& b)
|
MQL5 example:
vector a={1,2,3,4,5};
|
Python example:
import numpy as np
|