Codes

PACF_ACF for MetaTrader 5

The script calculates the autocorrelation and partial autocorrelation functions and displays them on a graph

Articles

Fundamentals of Bayesian Inference in Discrete and Continuous Settings: From Theory to Practical Model Implementation for MetaTrader 5

The article discusses the fundamentals of Bayesian statistics in both discrete and continuous settings. We will progress from classical Bayes’ theorem and simple examples involving coin flips to conjugate distributions and dynamic Bayesian updating, which enables real-time analysis of market quotes

The Hypothesis of Randomness: Searching for Hidden Patterns in Price Series for MetaTrader 5

The article describes a test of the hypothesis of randomness for quotes based on a chi-square statistic derived from the frequencies of overlapping s-chains. The article shows how to define discrete states and compare observed and expected frequencies in order to detect Markov memory in price

Markov Chain Monte Carlo Sampling Methods: The HMC Algorithm for MetaTrader 5

The article examines the Hamiltonian Monte Carlo (HMC) algorithm — the gold standard for sampling from complex multivariate distributions. A full-featured implementation of HMC in MQL5 is presented, including adaptive mass matrix tuning, MAP estimation using the L-BFGS optimization method, and

MCMC Sampling Methods: The Slice Sampling Algorithm for MetaTrader 5

The article examines slice sampling — an adaptive MCMC algorithm that automatically adjusts its sampling parameters. Its effectiveness is demonstrated using Bayesian linear and logistic regression models, and the results are compared with classical frequentist methods

MCMC Sampling Methods — The Metropolis-Hastings Algorithm for MetaTrader 5

The Metropolis-Hastings algorithm is a fundamental Markov chain Monte Carlo (MCMC) method that is widely used to approximate posterior distributions in Bayesian inference. This article describes the theoretical foundations of the algorithm, the implementation of the MHSampler class in MQL5, and

Forecasting a Conditional Distribution Using MLP for MetaTrader 5

In this article, we will consider an MLP-based regression model that predicts not only the conditional expectation but also the conditional variance. In other words, we will train our network to predict the entire distribution of future prices based on the input feature vector. But for this purpose

Gaussian Processes in Machine Learning (Part 2): Implementing and Testing a Classification Model in MQL5 for MetaTrader 5

In this section, we will look at the implementation of the key interfaces of the library of Gaussian processes in MQL5: IKernel, ILikelihood, and IInference. We will also demonstrate its operation on synthetic data and implement indicators for classification and regression, demonstrating its

Gaussian Processes in Machine Learning (Part 1): Classification Model in MQL5 for MetaTrader 5

The article considers the classification model of Gaussian processes. We will start by studying its theoretical principles moving on to the practical development of the GP library in MQL5

Gaussian Processes in Machine Learning: Regression Model in MQL5 for MetaTrader 5

We will review the basics of Gaussian processes (GP) as a probabilistic machine learning model and demonstrate its application to regression problems using synthetic data

Hilbert-Schmidt Independence Criterion (HSIC) for MetaTrader 5

The article discusses the non-parametric HSIC (Hilbert-Schmidt Independence Criterion) statistical test designed to identify linear and non-linear dependencies in data. Implementations of two algorithms for calculating HSIC in the MQL5 language are proposed: the exact permutation test and the gamma