DoEasy 函数库中的图形(第九十六部分):窗体对象中的图形和鼠标事件的处理·进阶篇
🖱️

DoEasy 函数库中的图形(第九十六部分):窗体对象中的图形和鼠标事件的处理·进阶篇

(2/3)· 移动控制点总误触整张图表?本篇拆解窗体对象如何独占鼠标响应避免联动漂移

实战向 第 2/3 篇
在自定义图形界面里拖动控制点,十有八九会连带滚动图表或弹出十字光标菜单,窗体跟着乱跑。很多人以为这是 MT5 画布本身的局限,其实是没有给窗体对象设独占的鼠标交互标志。本篇要做的,就是让悬停和按压只命中目标窗体。

枚举里的行业分类片段

在 MT5 的底层枚举定义里,品种行业属性被拆成多个板块常量,方便按产业链做板块轮动或相关性过滤。下面这段截取了原材料、通信服务、可选消费三个板块的常量声明,可直接贴进 EA 头文件复用。 原材料板块里出现了黄金、白银、特种化工、钢铁等独立常量,说明平台把贵金属与工业金属分得很细;通信服务则覆盖广告、广播、游戏多媒体到电信;可选消费从服装制造到互联网零售、休闲娱乐都有对应标签。 做跨品种对冲时,可用这些 MSG_SYM_INDUSTRY_* 常量快速圈定同板块标的,比如同时监控 MSG_SYM_INDUSTRY_GOLD 与 MSG_SYM_INDUSTRY_SILVER 的背离。外汇与贵金属波动高风险,板块归类仅作相关性参考,不预示方向。

MQL5 / C++
  MSG_SYM_INDUSTRY_GOLD,                                              class=class="str">"cmt">// Gold
  MSG_SYM_INDUSTRY_LUMBER_WOOD,                                       class=class="str">"cmt">// Lumber and wood production
  MSG_SYM_INDUSTRY_INDUSTRIAL_METALS,                                 class=class="str">"cmt">// Other industrial metals and mining
  MSG_SYM_INDUSTRY_PRECIOUS_METALS,                                   class=class="str">"cmt">// Other precious metals and mining
  MSG_SYM_INDUSTRY_PAPER,                                             class=class="str">"cmt">// Paper and paper products
  MSG_SYM_INDUSTRY_SILVER,                                            class=class="str">"cmt">// Silver
  MSG_SYM_INDUSTRY_SPECIALTY_CHEMICALS,                               class=class="str">"cmt">// Specialty chemicals
  MSG_SYM_INDUSTRY_STEEL,                                             class=class="str">"cmt">// Steel
  class=class="str">"cmt">//--- Communication services
  MSG_SYM_INDUSTRY_ADVERTISING,                                       class=class="str">"cmt">// Advertising agencies
  MSG_SYM_INDUSTRY_BROADCASTING,                                      class=class="str">"cmt">// Broadcasting
  MSG_SYM_INDUSTRY_GAMING_MULTIMEDIA,                                 class=class="str">"cmt">// Electronic gaming and multimedia
  MSG_SYM_INDUSTRY_ENTERTAINMENT,                                     class=class="str">"cmt">// Entertainment
  MSG_SYM_INDUSTRY_INTERNET_CONTENT,                                  class=class="str">"cmt">// Internet content and information
  MSG_SYM_INDUSTRY_PUBLISHING,                                        class=class="str">"cmt">// Publishing
  MSG_SYM_INDUSTRY_TELECOM,                                           class=class="str">"cmt">// Telecom services
  class=class="str">"cmt">//--- Consumer cyclical
  MSG_SYM_INDUSTRY_APPAREL_MANUFACTURING,                             class=class="str">"cmt">// Apparel manufacturing
  MSG_SYM_INDUSTRY_APPAREL_RETAIL,                                    class=class="str">"cmt">// Apparel retail
  MSG_SYM_INDUSTRY_AUTO_MANUFACTURERS,                                class=class="str">"cmt">// Auto manufacturers
  MSG_SYM_INDUSTRY_AUTO_PARTS,                                        class=class="str">"cmt">// Auto parts
  MSG_SYM_INDUSTRY_AUTO_DEALERSHIP,                                   class=class="str">"cmt">// Auto and truck dealerships
  MSG_SYM_INDUSTRY_DEPARTMENT_STORES,                                 class=class="str">"cmt">// Department stores
  MSG_SYM_INDUSTRY_FOOTWEAR_ACCESSORIES,                              class=class="str">"cmt">// Footwear and accessories
  MSG_SYM_INDUSTRY_FURNISHINGS,                                       class=class="str">"cmt">// Furnishing, fixtures and appliances
  MSG_SYM_INDUSTRY_GAMBLING,                                          class=class="str">"cmt">// Gambling
  MSG_SYM_INDUSTRY_HOME_IMPROV_RETAIL,                                class=class="str">"cmt">// Home improvement retail
  MSG_SYM_INDUSTRY_INTERNET_RETAIL,                                   class=class="str">"cmt">// Internet retail
  MSG_SYM_INDUSTRY_LEISURE,                                           class=class="str">"cmt">// Leisure

◍ 行业分类枚举的消费品与能源段

在 MT5 的自定义品种与股票类符号体系里,行业归属靠一组 MSG_SYM_INDUSTRY_* 枚举常量来标记,方便做板块轮动扫描或跨品种相关性过滤。 下面这段枚举覆盖了非必需消费品(Consumer Cyclical)到防御型消费品(Consumer Defensive),再到能源(Energy)三大类。其中非必需消费含住宿、奢侈品、包装容器、个人服务、休闲车、住宅营造、度假赌场、餐饮、专营零售、纺织、旅行服务共 12 个细分;防御型含酿酒、非酒精饮料、葡萄酒蒸馏、糖果、折扣店、教育培训、农产品、食品分销、食杂店、家用个护、包装食品、烟草共 13 个细分;能源含油气钻探、勘探开采、设备服务、一体化、中游、炼化营销共 6 个细分。 如果你在 EA 里想按板块统计波动贡献,直接引用这些常量做 SymbolInfoInteger(SYMBOL_INDUSTRY) 比对即可,不用自己硬编码字符串。外汇与贵金属交易本身高风险,跨市场股商联动分析仅作参考,实际敞口仍以杠杆品种为主。

MQL5 / C++
  MSG_SYM_INDUSTRY_LODGING,                                                                     class=class="str">"cmt">// Lodging
  MSG_SYM_INDUSTRY_LUXURY_GOODS,                                                                 class=class="str">"cmt">// Luxury goods
  MSG_SYM_INDUSTRY_PACKAGING_CONTAINERS,                                                         class=class="str">"cmt">// Packaging and containers
  MSG_SYM_INDUSTRY_PERSONAL_SERVICES,                                                            class=class="str">"cmt">// Personal services
  MSG_SYM_INDUSTRY_RECREATIONAL_VEHICLES,                                                        class=class="str">"cmt">// Recreational vehicles
  MSG_SYM_INDUSTRY_RESIDENT_CONSTRUCTION,                                                        class=class="str">"cmt">// Residential construction
  MSG_SYM_INDUSTRY_RESORTS_CASINOS,                                                              class=class="str">"cmt">// Resorts and casinos
  MSG_SYM_INDUSTRY_RESTAURANTS,                                                                  class=class="str">"cmt">// Restaurants
  MSG_SYM_INDUSTRY_SPECIALTY_RETAIL,                                                             class=class="str">"cmt">// Specialty retail
  MSG_SYM_INDUSTRY_TEXTILE_MANUFACTURING,                                                        class=class="str">"cmt">// Textile manufacturing
  MSG_SYM_INDUSTRY_TRAVEL_SERVICES,                                                              class=class="str">"cmt">// Travel services
  class=class="str">"cmt">//--- Consumer defensive
  MSG_SYM_INDUSTRY_BEVERAGES_BREWERS,                                                            class=class="str">"cmt">// Beverages - Brewers
  MSG_SYM_INDUSTRY_BEVERAGES_NON_ALCO,                                                           class=class="str">"cmt">// Beverages - Non-alcoholic
  MSG_SYM_INDUSTRY_BEVERAGES_WINERIES,                                                           class=class="str">"cmt">// Beverages - Wineries and distilleries
  MSG_SYM_INDUSTRY_CONFECTIONERS,                                                                class=class="str">"cmt">// Confectioners
  MSG_SYM_INDUSTRY_DISCOUNT_STORES,                                                              class=class="str">"cmt">// Discount stores
  MSG_SYM_INDUSTRY_EDUCATION_TRAINIG,                                                            class=class="str">"cmt">// Education and training services
  MSG_SYM_INDUSTRY_FARM_PRODUCTS,                                                                class=class="str">"cmt">// Farm products
  MSG_SYM_INDUSTRY_FOOD_DISTRIBUTION,                                                            class=class="str">"cmt">// Food distribution
  MSG_SYM_INDUSTRY_GROCERY_STORES,                                                               class=class="str">"cmt">// Grocery stores
  MSG_SYM_INDUSTRY_HOUSEHOLD_PRODUCTS,                                                           class=class="str">"cmt">// Household and personal products
  MSG_SYM_INDUSTRY_PACKAGED_FOODS,                                                               class=class="str">"cmt">// Packaged foods
  MSG_SYM_INDUSTRY_TOBACCO,                                                                      class=class="str">"cmt">// Tobacco
  class=class="str">"cmt">//--- Energy
  MSG_SYM_INDUSTRY_OIL_GAS_DRILLING,                                                             class=class="str">"cmt">// Oil and gas drilling
  MSG_SYM_INDUSTRY_OIL_GAS_EP,                                                                   class=class="str">"cmt">// Oil and gas extraction and processing
  MSG_SYM_INDUSTRY_OIL_GAS_EQUIPMENT,                                                            class=class="str">"cmt">// Oil and gas equipment and services
  MSG_SYM_INDUSTRY_OIL_GAS_INTEGRATED,                                                           class=class="str">"cmt">// Oil and gas integrated
  MSG_SYM_INDUSTRY_OIL_GAS_MIDSTREAM,                                                            class=class="str">"cmt">// Oil and gas midstream
  MSG_SYM_INDUSTRY_OIL_GAS_REFINING,                                                             class=class="str">"cmt">// Oil and gas refining and marketing

「枚举行业分类的宏定义片段」

在 MT5 的自定义指标或 EA 里做板块轮动分析时,常需要把标的按行业归类。下面这段枚举值覆盖了能源、金融、医疗三大类的细分行业,可直接挂到符号属性结构里做过滤。 能源部分先列了 Thermal coal 与 Uranium 两个独立宏,金融段则从 Exchange traded fund 一路细分到 Shell companies,共 21 个行业常量,医疗段包含 Biotechnology 到 Medical distribution 等 9 个分类。 实战中若你只想盯金融板块的 Regional banks 与 Credit services,把对应宏写进符号筛选数组即可,MT5 符号树不会自动按这些标签分组,得自己用 SymbolSelect + 自定义映射来实现。外汇与贵金属本身不在这套行业枚举内,跨市场对冲时需注意这类股票行业标签对币对无效,杠杆交易高风险。

MQL5 / C++
  MSG_SYM_INDUSTRY_THERMAL_COAL,                                                                     class=class="str">"cmt">// Thermal coal
  MSG_SYM_INDUSTRY_URANIUM,                                                                           class=class="str">"cmt">// Uranium
  class=class="str">"cmt">//--- Finance
  MSG_SYM_INDUSTRY_EXCHANGE_TRADED_FUND,                                                              class=class="str">"cmt">// Exchange traded fund
  MSG_SYM_INDUSTRY_ASSETS_MANAGEMENT,                                                                 class=class="str">"cmt">// Assets management
  MSG_SYM_INDUSTRY_BANKS_DIVERSIFIED,                                                                 class=class="str">"cmt">// Banks - Diversified
  MSG_SYM_INDUSTRY_BANKS_REGIONAL,                                                                    class=class="str">"cmt">// Banks - Regional
  MSG_SYM_INDUSTRY_CAPITAL_MARKETS,                                                                   class=class="str">"cmt">// Capital markets
  MSG_SYM_INDUSTRY_CLOSE_END_FUND_DEBT,                                                               class=class="str">"cmt">// Closed-End fund - Debt
  MSG_SYM_INDUSTRY_CLOSE_END_FUND_EQUITY,                                                             class=class="str">"cmt">// Closed-end fund - Equity
  MSG_SYM_INDUSTRY_CLOSE_END_FUND_FOREIGN,                                                            class=class="str">"cmt">// Closed-end fund - Foreign
  MSG_SYM_INDUSTRY_CREDIT_SERVICES,                                                                   class=class="str">"cmt">// Credit services
  MSG_SYM_INDUSTRY_FINANCIAL_CONGLOMERATE,                                                            class=class="str">"cmt">// Financial conglomerates
  MSG_SYM_INDUSTRY_FINANCIAL_DATA_EXCHANGE,                                                           class=class="str">"cmt">// Financial data and stock exchange
  MSG_SYM_INDUSTRY_INSURANCE_BROKERS,                                                                 class=class="str">"cmt">// Insurance brokers
  MSG_SYM_INDUSTRY_INSURANCE_DIVERSIFIED,                                                             class=class="str">"cmt">// Insurance - Diversified
  MSG_SYM_INDUSTRY_INSURANCE_LIFE,                                                                    class=class="str">"cmt">// Insurance - Life
  MSG_SYM_INDUSTRY_INSURANCE_PROPERTY,                                                                class=class="str">"cmt">// Insurance - Property and casualty
  MSG_SYM_INDUSTRY_INSURANCE_REINSURANCE,                                                             class=class="str">"cmt">// Insurance - Reinsurance
  MSG_SYM_INDUSTRY_INSURANCE_SPECIALTY,                                                               class=class="str">"cmt">// Insurance - Specialty
  MSG_SYM_INDUSTRY_MORTGAGE_FINANCE,                                                                  class=class="str">"cmt">// Mortgage finance
  MSG_SYM_INDUSTRY_SHELL_COMPANIES,                                                                   class=class="str">"cmt">// Shell companies
  class=class="str">"cmt">//--- Healthcare
  MSG_SYM_INDUSTRY_BIOTECHNOLOGY,                                                                     class=class="str">"cmt">// Biotechnology
  MSG_SYM_INDUSTRY_DIAGNOSTICS_RESEARCH,                                                              class=class="str">"cmt">// Diagnostics and research
  MSG_SYM_INDUSTRY_DRUGS_MANUFACTURERS,                                                               class=class="str">"cmt">// Drugs manufacturers - general
  MSG_SYM_INDUSTRY_DRUGS_MANUFACTURERS_SPEC,                                                          class=class="str">"cmt">// Drugs manufacturers - Specialty and generic
  MSG_SYM_INDUSTRY_HEALTHCARE_PLANS,                                                                  class=class="str">"cmt">// Healthcare plans
  MSG_SYM_INDUSTRY_HEALTH_INFORMATION,                                                                class=class="str">"cmt">// Health information services
  MSG_SYM_INDUSTRY_MEDICAL_FACILITIES,                                                                class=class="str">"cmt">// Medical care facilities
  MSG_SYM_INDUSTRY_MEDICAL_DEVICES,                                                                   class=class="str">"cmt">// Medical devices
  MSG_SYM_INDUSTRY_MEDICAL_DISTRIBUTION                                                               class=class="str">"cmt">// Medical distribution

行业枚举里的工业与地产分支

在 MT5 的 symbol 属性体系里,行业分类用一组 MSG_SYM_INDUSTRY_* 枚举常量来表达,方便用代码按板块过滤标的。上面这段截取的是 Industrials(工业)与 Real estate(房地产)两个大分支的常量定义,可以看到工业项下细分到航空航天、铁路、卡车运输、特种机械等 27 个子行业。 如果你写 EA 时只想监控工业与地产板块的异动,直接拿这些常量做 SymbolInfoInteger(sym, SYMBOL_INDUSTRY) 的比对就行。下面这段是原文里的枚举片段,贴进 MT5 的 mqh 或 mq5 里就能编译通过。 房地产分支只有 3 个常量:开发、多元化、服务。相比工业的子行业数量差了一个数量级,回测板块轮动策略时要注意两个分支的样本权重可能严重失衡。

MQL5 / C++
  MSG_SYM_INDUSTRY_MEDICAL_INSTRUMENTS,                    class=class="str">"cmt">// Medical instruments and supplies
  MSG_SYM_INDUSTRY_PHARM_RETAILERS,                         class=class="str">"cmt">// Pharmaceutical retailers
  class=class="str">"cmt">//--- Industrials
  MSG_SYM_INDUSTRY_AEROSPACE_DEFENSE,                      class=class="str">"cmt">// Aerospace and defense
  MSG_SYM_INDUSTRY_AIRLINES,                               class=class="str">"cmt">// Airlines
  MSG_SYM_INDUSTRY_AIRPORTS_SERVICES,                      class=class="str">"cmt">// Airports and air services
  MSG_SYM_INDUSTRY_BUILDING_PRODUCTS,                      class=class="str">"cmt">// Building products and equipment
  MSG_SYM_INDUSTRY_BUSINESS_EQUIPMENT,                     class=class="str">"cmt">// Business equipment and supplies
  MSG_SYM_INDUSTRY_CONGLOMERATES,                          class=class="str">"cmt">// Сonglomerates
  MSG_SYM_INDUSTRY_CONSULTING_SERVICES,                    class=class="str">"cmt">// Consulting services
  MSG_SYM_INDUSTRY_ELECTRICAL_EQUIPMENT,                   class=class="str">"cmt">// Electrical equipment and parts
  MSG_SYM_INDUSTRY_ENGINEERING_CONSTRUCTION,               class=class="str">"cmt">// Engineering and construction
  MSG_SYM_INDUSTRY_FARM_HEAVY_MACHINERY,                   class=class="str">"cmt">// Farm and heavy construction machinery
  MSG_SYM_INDUSTRY_INDUSTRIAL_DISTRIBUTION,                class=class="str">"cmt">// Industrial distribution
  MSG_SYM_INDUSTRY_INFRASTRUCTURE_OPERATIONS,              class=class="str">"cmt">// Infrastructure operations
  MSG_SYM_INDUSTRY_FREIGHT_LOGISTICS,                      class=class="str">"cmt">// Integrated freight and logistics
  MSG_SYM_INDUSTRY_MARINE_SHIPPING,                        class=class="str">"cmt">// Marine shipping
  MSG_SYM_INDUSTRY_METAL_FABRICATION,                      class=class="str">"cmt">// Metal fabrication
  MSG_SYM_INDUSTRY_POLLUTION_CONTROL,                      class=class="str">"cmt">// Pollution and treatment controls
  MSG_SYM_INDUSTRY_RAILROADS,                              class=class="str">"cmt">// Railroads
  MSG_SYM_INDUSTRY_RENTAL_LEASING,                         class=class="str">"cmt">// Rental and leasing services
  MSG_SYM_INDUSTRY_SECURITY_PROTECTION,                    class=class="str">"cmt">// Security and protection services
  MSG_SYM_INDUSTRY_SPEALITY_BUSINESS_SERVICES,             class=class="str">"cmt">// Specialty business services
  MSG_SYM_INDUSTRY_SPEALITY_MACHINERY,                     class=class="str">"cmt">// Specialty industrial machinery
  MSG_SYM_INDUSTRY_STUFFING_EMPLOYMENT,                    class=class="str">"cmt">// Stuffing and employment services
  MSG_SYM_INDUSTRY_TOOLS_ACCESSORIES,                      class=class="str">"cmt">// Tools and accessories
  MSG_SYM_INDUSTRY_TRUCKING,                               class=class="str">"cmt">// Trucking
  MSG_SYM_INDUSTRY_WASTE_MANAGEMENT,                       class=class="str">"cmt">// Waste management
  class=class="str">"cmt">//--- Real estate
  MSG_SYM_INDUSTRY_REAL_ESTATE_DEVELOPMENT,                class=class="str">"cmt">// Real estate - Development
  MSG_SYM_INDUSTRY_REAL_ESTATE_DIVERSIFIED,                class=class="str">"cmt">// Real estate - Diversified
  MSG_SYM_INDUSTRY_REAL_ESTATE_SERVICES,                   class=class="str">"cmt">// Real estate services

◍ 行业分类枚举与本地化字段的落地写法

在 MT5 的证券属性体系里,行业维度被拆成了 REIT、科技、公用事业三大块,每块用一组 MSG_SYM_INDUSTRY_* 常量做标识。比如 REIT 下就分了 Diversified、Healthcare、Hotel and motel、Industrial、Mortgage、Office、Residential、Retail、Specialty 共 9 个子类,科技块覆盖从 Communication equipment 到 Solar 的 14 个细分,公用事业则含 Diversified 到 Regulated water 的 6 类。 这些枚举不是给图表看的,而是喂给符号描述结构体用的。下方代码段里能看到俄英双语的本地化映射,其中「Сектор экономики / The sector of the economy」和「Вид промышленности или отрасль экономики / The industry or the economy branch」两条,正好对应经济板块与工业分支两级字段,高亮部分就是直接在 CSymbol 相关字典里注册的新条目。 开 MT5 切到 MetaEditor,搜 MSG_SYM_INDUSTRY_REIT_MORTAGE 就能确认 Mortgage 类 REIT 的常量名拼法(原文拼的是 MORTAGE 而非标准 MORTGAGE),复制去写行业过滤器时别照常规拼写改它,否则编译直接报未定义。

MQL5 / C++
  MSG_SYM_INDUSTRY_REIT_DIVERSIFIED,              class=class="str">"cmt">// REIT - Diversified
  MSG_SYM_INDUSTRY_REIT_HEALTCARE,                class=class="str">"cmt">// REIT - Healthcase facilities
  MSG_SYM_INDUSTRY_REIT_HOTEL_MOTEL,              class=class="str">"cmt">// REIT - Hotel and motel
  MSG_SYM_INDUSTRY_REIT_INDUSTRIAL,               class=class="str">"cmt">// REIT - Industrial
  MSG_SYM_INDUSTRY_REIT_MORTAGE,                  class=class="str">"cmt">// REIT - Mortgage
  MSG_SYM_INDUSTRY_REIT_OFFICE,                   class=class="str">"cmt">// REIT - Office
  MSG_SYM_INDUSTRY_REIT_RESIDENTAL,               class=class="str">"cmt">// REIT - Residential
  MSG_SYM_INDUSTRY_REIT_RETAIL,                   class=class="str">"cmt">// REIT - Retail
  MSG_SYM_INDUSTRY_REIT_SPECIALITY,               class=class="str">"cmt">// REIT - Specialty
  class=class="str">"cmt">//--- Technology
  MSG_SYM_INDUSTRY_COMMUNICATION_EQUIPMENT,       class=class="str">"cmt">// Communication equipment
  MSG_SYM_INDUSTRY_COMPUTER_HARDWARE,             class=class="str">"cmt">// Computer hardware
  MSG_SYM_INDUSTRY_CONSUMER_ELECTRONICS,          class=class="str">"cmt">// Consumer electronics
  MSG_SYM_INDUSTRY_ELECTRONIC_COMPONENTS,         class=class="str">"cmt">// Electronic components
  MSG_SYM_INDUSTRY_ELECTRONIC_DISTRIBUTION,       class=class="str">"cmt">// Electronics and computer distribution
  MSG_SYM_INDUSTRY_IT_SERVICES,                   class=class="str">"cmt">// Information technology services
  MSG_SYM_INDUSTRY_SCIENTIFIC_INSTRUMENTS,        class=class="str">"cmt">// Scientific and technical instruments
  MSG_SYM_INDUSTRY_SEMICONDUCTOR_EQUIPMENT,       class=class="str">"cmt">// Semiconductor equipment and materials
  MSG_SYM_INDUSTRY_SEMICONDUCTORS,                class=class="str">"cmt">// Semiconductors
  MSG_SYM_INDUSTRY_SOFTWARE_APPLICATION,          class=class="str">"cmt">// Software - Application
  MSG_SYM_INDUSTRY_SOFTWARE_INFRASTRUCTURE,       class=class="str">"cmt">// Software - Infrastructure
  MSG_SYM_INDUSTRY_SOLAR,                         class=class="str">"cmt">// Solar
  class=class="str">"cmt">//--- Utilities
  MSG_SYM_INDUSTRY_UTILITIES_DIVERSIFIED,         class=class="str">"cmt">// Utilities - Diversified
  MSG_SYM_INDUSTRY_UTILITIES_POWERPRODUCERS,      class=class="str">"cmt">// Utilities - Independent power producers
  MSG_SYM_INDUSTRY_UTILITIES_RENEWABLE,           class=class="str">"cmt">// Utilities - Renewable
  MSG_SYM_INDUSTRY_UTILITIES_REGULATED_ELECTRIC,  class=class="str">"cmt">// Utilities - Regulated electric
  MSG_SYM_INDUSTRY_UTILITIES_REGULATED_GAS,       class=class="str">"cmt">// Utilities - Regulated gas
  MSG_SYM_INDUSTRY_UTILITIES_REGULATED_WATER,     class=class="str">"cmt">// Utilities - Regulated water  
class=class="str">"cmt">//--- CAccount
class=class="str">"cmt">//--- CSymbol
  {"Индекс в окне \"Обзор рынка\"","Index in \"Market Watch window\""},
  
  {"Сектор экономики","The sector of the economy"},
  {"Вид промышленности или отрасль экономики","The industry or the economy branch"},

「属性枚举里藏着的毫秒与希腊字母」

上面这组键值对是 MT5 符号属性枚举(ENUM_SYMBOL_INFO_STRING / 相关宏)里实际存在的成员,直接拷进多语言资源表就能用。注意高亮那几行:Time of the last quote in milliseconds 在老版本终端里没有,只有 build 2340 之后才补进枚举,回测历史数据若早于这个节点会返回空串。 另一组高亮项是期权类衍生品的希腊字母——delta、theta、gamma、vega、rho、omega 外加 sensitivity,做贵金属期权或外汇期权对冲时,这些字段能直接读出来算组合暴露,不用自己从 tick 反推。 还有一处原文字段拼错了:Cuntry 应为 Country,复制英文字面量到代码里若严格匹配会漏掉国家属性,建议本地化时手动修正。外汇与贵金属杠杆高,读取这些属性做仓位计算仅作参考,实际风险可能随波动放大。

MQL5 / C++
  {"Пользовательский символ","Custom symbol"},
  {"Тип цены для построения баров","Price type used for generating symbols bars"},
  {"Символ с таким именем существует","Symbol with this name exists"},
  {"Символ выбран в Market Watch","Symbol selected in Market Watch"},
  {"Символ отображается в Market Watch","Symbol visible in Market Watch"},
  {"Количество сделок в текущей сессии","Number of deals in the current session"},
  {"Общее число ордеров на покупку в текущий момент","Number of Buy orders at the moment"},
  {"Общее число ордеров на продажу в текущий момент","Number of Sell orders at the moment"},
  {"Объем в последней сделке","Volume of the last deal"},
  {"Максимальный объём за день","Maximal day volume"},
  {"Минимальный объём за день","Minimal day volume"},
  {"Время последней котировки","Time of last quote"},
  {"Время последней котировки в миллисекундах","Time of the last quote in milliseconds"},
  {"Количество знаков после запятой","Digits after decimal point"},
  {"Количество знаков после запятой в значении лота","Digits after decimal point in value of the lot"},
  {"Максимально допустимое значение цены на сессию","Maximal price of the current session"},
  {"Размер контракта или маржи для одного лота перекрытых позиций","Contract size or margin value per one lot of hedged positions"},
  {"Изменение текущей цены относительно конца предыдущего торгового дня, в процентах","Change of the current price relative to the end of the previous trading day in %"},
  {"Волатильность цены в процентах","Price volatility in %"},
  {"Теоретическая цена опциона","Theoretical option price"},
  {"Дельта опциона/варранта","Option/warrant delta"},
  {"Тета опциона/варранта","Option/warrant theta"},
  {"Гамма опциона/варранта","Option/warrant gamma"},
  {"Вега опциона/варранта","Option/warrant vega"},
  {"Ро опциона/варранта","Option/warrant rho"},
  {"Омега опциона/варранта","Option/warrant omega"},
  {"Чувствительность опциона/варранта","Option/warrant sensitivity"},
  {"Имя символа","Symbol name"},
  {"Имя базового актива для производного инструмента","Underlying asset of derivative"},
  {"Страна","Cuntry"},
  {"Сектор экономики","Sector of the economy"},
  {"Отрасль экономики или вид промышленности","Branch of the economy or type of industry"},
  {"Базовая валюта инструмента","Basic currency of symbol"},
  {"Валюта прибыли","Profit currency"},
  {"Валюта залоговых средств","Margin currency"},
  {"Источник текущей котировки","Feeder of the current quote"},
  {"Описание символа","Symbol description"},
  {"Формула для построения цены пользовательского символа","Formula used for custom symbol pricing"},
  {"Имя торгового символа в системе международных идентификационных кодов","Symbol name in ISIN system"},
  {"Адрес интернет страницы с информацией по символу","Address of web page containing symbol information"},
  {"Путь в дереве символов","Path in symbol tree"}
把鼠标命中逻辑交给小布验证
这些诊断小布盯盘的 AIGC 已内置,打开对应品种页即可看到交互状态快照,你专注决策而非反复调试事件标志。

常见问题

该标志令只有被悬停且按下按钮的窗体执行操作,其余窗体保持重置状态,避免多窗体争抢鼠标事件导致图表异常移动。
它们使消息类和返回描述的方法显著膨胀,但只需在枚举里加常量并配宏替换,就能按新属性选排品种。
可以,小布的品种页与图形诊断模块能呈现对象交互状态,省去手动打印事件日志的重复劳动。
只要同步更新宏替换和排序枚举常数,已有逻辑不受影响,新属性可纳入排序条件。
这是预期行为,防止光标途经窗体时误触发重定位,仅当进入设了交互标志的窗体才开始跟随。