RedeeCash Statistics
- 程序库
- Patrick Odonnell Ingle
- 版本: 1.0
Version History
Date | Version | Changes |
---|---|---|
07/10/2022 | 1.00 | Initial release |
Description
A collection of modern statistical functions that can be integrated into your own strategy.
The included functions are,
- Mean
- Median
- Range
- Skew
- Max
- Min
- IRange
- Deviations
- AbsoluteDeviations
- MAD
- StandardDeviation
- Variance
- GetCorrelation
- SamplingDistributionStandardDeviation
- ZScore
- CorrelationCoefficient
- CoVariance
- Beta
- Confidence
- SNormInv
- PercentOfValue
- ValueOfPercent
MQL Header (mqh)
The required header is
//+------------------------------------------------------------------+ //| RedeeCash Statistics.mqh | //| Copyright 2022, PressPage Entertainment Inc DBA RedeeCash | //| https://www.forexgeneral.info | //+------------------------------------------------------------------+ #property copyright "Copyright 2022, PressPage Entertainment Inc DBA RedeeCash" #property link "https://www.forexgeneral.info" #property strict //+------------------------------------------------------------------+ //| EX4 imports | //+------------------------------------------------------------------+ #import "RedeeCash Statistics.ex4" double Mean(double &Numbers[]); double Median(double &Numbers[]); double Range(double &Numbers[]); string Skew(double &Numbers[]); double Max(double& Numbers[]); double Min(double &Numbers[]); double IRange(double &Numbers[]); void Deviations(double &Numbers[], double &values[]); void AbsoluteDeviations(double &Numbers[],double &values[]); double MAD(double &Numbers[]); double StandardDeviation(double &Numbers[]); double Variance(double &Numbers[]); bool GetCorrelation(double &x[], double &y[], double &covXY, double &pearson); double SamplingDistributionStandardDeviation(double &Numbers[]); double ZScore(double raw, double &Numbers[]); double CorrelationCoefficient(double &x[], double &y[]); double CoVariance(double &x[], double &y[]); double Beta(double &x[], double &y[]); double Confidence(double estimate, double &Numbers[]); double SNormInv(double p); double PercentOfValue(double value, double &numbers[]); double ValueOfPercent(double percent, double &numbers[]); #import //+------------------------------------------------------------------+
Code Sample
The code sample is a shortened test script,
//+------------------------------------------------------------------+ //| Test RedeeCash Statistics.mq4 | //| Copyright 2022, PressPage Entertainment Inc DBA RedeeCash | //| https://www.forexgeneral.info | //+------------------------------------------------------------------+ #property copyright "Copyright 2022, PressPage Entertainment Inc DBA RedeeCash" #property link "https://www.forexgeneral.info" #property version "1.00" #property strict #include <RedeeCash Statistics.mqh> //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- double Numbers[]; ArrayCopy(Numbers,Close); double _mean = Mean(Numbers); Print("Mean on Close price for ",Symbol()," is ",DoubleToString(_mean)); } //+------------------------------------------------------------------+
I was unable to use the product