Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2008.02.27 08:49
Libraries

Z-Score Calculation - library for MetaTrader 4

| English Русский 中文 Español Deutsch 日本語 Português

Views:
4855
Rating:
votes: 12
\MQL4\Include\
Z_include.mqh (5.46 KB)view
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 \MQL4\include\...

An exemplary script that calculates Z-score on a trading account:

//+------------------------------------------------------------------+
//|                                                        Get_Z.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
 
#include <Z_include.mqh>
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
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.

Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/7452

Acceleration&Speed Indicator Acceleration&Speed Indicator

The indicator Acceleration&Speed shows speed and acceleration of a price change.

Awesome_Signal - Extended Awesome Awesome_Signal - Extended Awesome

The standard Awesome with some amendments: signal line, setup of quick, slow, signal line, shifting of the signal line.

TREND_alexcud TREND_alexcud

A multi-timeframe indicator. It shows the trend direction of several time charts in a separate window.

Alternative of Moving Averages on the Basis of Bezier Curve Alternative of Moving Averages on the Basis of Bezier Curve

This indicator is alternative of moving averages, but with lower lag and adjustable sensitivity coefficient.