A statistical measure of correlation of the fluctuations of two different
quantities. In finance, covariance is applied to the annual rates of return of
different investments, to measure the correlation of their year-to-year
fluctuations in performance.
Public Function Covariance(ByVal AVIn() As Double, ByVal BVIn() As Double, ByVal Lag As Long) As Double
Example:
Dim TA4Net As
New TA4Net.CTAFunctions("YOUR-REGISTRATION-CODE")
Dim Result() As
Double
Dim CloseValues() As
Double
Dim
OpenValues() As
Double
' loading values to arrays
CloseValues =
GetCloseValues()
OpenValues =
GetCloseValues()
' calculating Technical Analysis function
Result = TA4Net.Covariance(OpenValues, CloseValues, 14)