Building MQL4/MQL5 Symbol Tabs and Saving Chart Selections
Summary
This article extends a MetaTrader utility for filtering and navigating symbols with separate tabs for all candidates and user-selected long, short, and range lists. It describes storing each tab’s symbols in an array, drawing tab buttons in a loop, showing only the active tab’s symbols, and adding or removing a selected symbol through chart controls. Tab counts provide a quick view of saved selections.
The article also explains using conditional compilation to keep MQL4 and MQL5 code paths in one source, since the platforms handle positions and orders differently. Users can populate the candidate list from a text file or input, or use broker symbols or Market Watch symbols as fallbacks; the text describes importing lists copied from a stock screener. This is a chart-interface and workflow utility, not a trading strategy. It provides implementation guidance but no performance testing, and the source excerpt is incomplete, so details of persistence and some button behavior are not fully documented.
Key ideas
- Conditional compilation can maintain MQL4- and MQL5-specific logic in one utility.
- Separate arrays let the interface manage all symbols and several user-defined selection tabs.
- A loop can render tab buttons and display symbols from the currently active list.
- The utility supports adding and removing symbols from a selection through chart controls.
- Ticker lists can come from text input or broker and Market Watch symbol lists.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.