Skip to content
All library documents

Regular Expression Basics for Trading Data and MQL5

Article MQL5 articles

Summary

This article introduces regular expressions as a way to find and replace text that matches a pattern. It explains character classes, repetition operators, grouping, alternatives, and anchors, with examples of how patterns match strings. It also notes that the MQL5 library follows a backtracking approach similar to implementations in several common programming languages.

The practical discussion focuses on MQL5 support code, including typed lists, dictionaries, linked lists, enumerators, and string comparison for dictionary keys. An example application parses trading history from HTML tables and filters records, illustrating how these tools can help process trading data. The article is a programming reference rather than a trading strategy or quantitative study: it presents no market analysis, tests of trading signals, or performance evidence. Its explanations are introductory, and the text advises consulting language-specific documentation for details because implementations can differ.

Key ideas

  • Regular expressions use patterns to locate or replace matching text.
  • Character classes, repetition, grouping, alternatives, and anchors cover common pattern-matching needs.
  • The MQL5 implementation uses a backtracking regular-expression handler.
  • Typed collections and enumerators can support structured parsing of trading history.
  • The article explains software tools but does not evaluate a trading method or market result.

Tags

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