Code Base
Libraries
Z-Score Calculation
To post a new code, please log in or register
| Name: |
| Z-Score Calculation [ ru | cn ] | |
|
| Author:
|
Rosh (2008.02.27 09:49) |
| Downloaded: |
480 |
| Download: |
|
The include file named Z_include.mqh contains a function that calculates the following parameters on the data array:
- Max - the maximum value;
- Min - the minimum value;
- universal mean - the mean value;
- standard deviation - mean-squared deviation (unbiased estimate);
- skew;
- kurtosis;
- Z-score on the data array.
You can find the description of the term of Z-score in the article Mathematics in Trading: How to Estimate Trade Results
The file should be placed in the folder of \experts\include\...
An exemplary script that calculates Z-score on a trading account:
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#include <Z_include.mqh>
int start()
{
Print("Z-score of trades made on account ",AccountNumber()," is equal to ",DoubleToStr(getZ(),2));
return(0);
}
The header file, NormalProbability.mq4, contains an example of normal probability using the array.
|
|
|
|