Skip to content
All library documents

Integrating MATLAB SARIMA Forecasts and Kalman Filtering into MetaTrader 5

Article MQL5 articles

Summary

The article presents a development workflow for using MATLAB 2018 computations in an MQL5 indicator. Its example applies a seasonal autoregressive integrated moving average model to price time series and combines prediction with Kalman filtering. MATLAB Compiler SDK produces a C++ shared library, while a Visual C++ adapter translates data between MQL5's C-style memory and MATLAB's matrix representation. The guide covers library configuration, runtime setup, and incorporating the calculation module into the indicator.

The predictive indicator serves primarily as a demonstration of cross-platform integration. The document describes the model and implementation process, but the supplied excerpt does not report forecast accuracy, comparative tests, or trading results. It notes potential further work in detecting seasonal components automatically and improving model selection. The approach also depends on compatible 64-bit software, MATLAB Runtime components, and correctly configured libraries, so its practical value rests on both forecasting quality and deployment setup.

Key ideas

  • MATLAB Compiler SDK can package MATLAB functions as a C++ shared library for use by other programs.
  • A Visual C++ adapter translates data between MQL5 arrays and MATLAB matrix structures.
  • The example indicator combines SARIMA price forecasting with Kalman filtering.
  • The article demonstrates software integration but provides no forecast accuracy or trading performance evidence.
  • Automatic seasonality detection and better model selection are identified as possible extensions.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.