Using ALGLIB BLEIC, L-BFGS, and NS for Constrained Optimization
Summary
This article introduces three deterministic optimization methods available through ALGLIB in MetaTrader 5: BLEIC, L-BFGS, and NS. It explains objective functions, adjustable parameters, and box, equality, and inequality constraints, then focuses on practical examples using bounded variables and a smooth inverted-paraboloid objective. The examples show how to initialize parameter ranges and starting values, configure each method, run optimization, and retrieve results.
The discussion highlights practical sensitivities: gradient-based methods work best with smooth objectives, can converge to local rather than global optima, and depend on starting points and parameter scales. Numerical differentiation settings can also affect whether NS uses its available evaluation budget effectively. The examples report function-call counts and objective values for the artificial test function, not trading-system performance. The article warns that some methods may call the objective an unpredictable number of times and explains that stopping control can be limited, so users should account for computational cost when applying them to strategy parameters.
Key ideas
- ALGLIB offers deterministic methods for optimizing objective functions subject to parameter constraints.
- BLEIC handles boundary and linear constraints by adapting to active constraints during the search.
- Starting values and parameter scales matter for gradient-based methods and can affect convergence.
- Numerical differentiation step sizes influence optimization behavior, including premature stopping.
- The examples use a synthetic objective and do not demonstrate improved trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.