Discussing the article: "Markowitz Mean-Variance Optimization for MQL5: A Native Efficient-Frontier Portfolio Builder"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Markowitz Mean-Variance Optimization for MQL5: A Native Efficient-Frontier Portfolio Builder.
Most Expert Advisors decide when to buy or sell a single instrument. This one decides how much of your equity to put into each instrument in a basket, using the same weight formula Harry Markowitz published in 1952. If you have never built a multi-symbol EA before, the mental shift is bigger than the math: there is no "signal" here, no crossover, no oscillator. There is a covariance matrix, three closed-form solvers, and a rebalance loop that nudges live positions toward whatever the matrix says is optimal this week.
Everything below is native MQL5: no external DLLs, no Python bridge, and no imported matrix library. The Gauss-Jordan inversion, the covariance estimation, and the Lagrangian frontier solve are all hand-written in MarkowitzCore.mqh, and I'll walk through the actual functions instead of talking around them. Wherever I show a formula, the next block is the code that implements it, so you can check one against the other line by line.
Author: Adewumi Babatunde Gbadebo