Skip to content
All library documents

Universal Indicator Interfaces and Pending-Order Management in Expert Advisors

Article MQL5 articles

Summary

This article describes updates to an object-oriented Expert Advisor framework. It introduces CUnIndicator, a general interface for accessing built-in and custom indicators without writing a separate wrapper class for every indicator. The article contrasts that approach with an earlier moving-average wrapper, whose methods and stored parameters illustrate the repetitive work involved in handling indicators individually.

The other main change gives the strategy engine a larger role in managing pending orders. Strategy classes can override dedicated buy-side and sell-side support methods to handle pending orders in a way similar to active positions. The article also presents Impulse 2.0 as an example of the revised strategy style and discusses reorganizing the project files. The evidence is an implementation and framework example, not a performance evaluation: it does not report trading results or establish that the new interface improves strategy outcomes. Its focus is software structure and reducing repeated low-level indicator and order-management work in MQL5.

Key ideas

  • A universal indicator class can reduce the need to build a separate wrapper for each indicator.
  • The earlier wrapper approach stores indicator parameters and provides methods to initialize and read values.
  • The strategy engine can manage pending orders through overridable buy-side and sell-side methods.
  • Impulse 2.0 demonstrates the revised strategy structure alongside an older-style version.
  • The article explains software organization and interfaces, not the profitability of the example strategy.

Tags

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