diff --git a/Scripts/MyScripts/AccountInfoDisplayInit.mqh b/Scripts/MyScripts/AccountInfoDisplayInit.mqh deleted file mode 100644 index ddc9a09..0000000 --- a/Scripts/MyScripts/AccountInfoDisplayInit.mqh +++ /dev/null @@ -1,97 +0,0 @@ -//+------------------------------------------------------------------+ -//| AccountInfoDisplayInit.mqh | -//| Copyright 2000-2025, MetaQuotes Ltd. | -//| https://www.mql5.com | -//+------------------------------------------------------------------+ - -//--- MODIFICATION: Using an enumeration for robust indexing -// This enum provides meaningful names for each row, preventing errors -// if the order of items in init_str changes. -enum ENUM_INFO_ROWS - { -// --- I. Basic Account Information --- - ROW_HEADING_BASIC, - ROW_LOGIN, - ROW_NAME, - ROW_SERVER, - ROW_COMPANY, - ROW_CURRENCY, - ROW_CURRENCY_DIGITS, - -// --- II. Financial Status and Balances --- - ROW_HEADING_FINANCIAL, - ROW_BALANCE, - ROW_CREDIT, - ROW_PROFIT, - ROW_EQUITY, - -// --- III. Margin and Risk Management --- - ROW_HEADING_MARGIN, - ROW_MARGIN, - ROW_MARGIN_FREE, - ROW_MARGIN_LEVEL, - ROW_MARGIN_CALL, - ROW_MARGIN_STOPOUT, - -// --- IV. Trading Modes and Rules --- - ROW_HEADING_RULES, - ROW_TRADE_MODE, - ROW_LEVERAGE, - ROW_MARGIN_MODE, - ROW_STOPOUT_MODE, - ROW_FIFO_CLOSE, - ROW_HEDGE_ALLOWED, - -// --- V. Trading Permissions --- - ROW_HEADING_PERMISSIONS, - ROW_TRADE_ALLOWED, - ROW_TRADE_EXPERT, - -// A special member to get the total count of rows - ROW_TOTAL_COUNT - }; - -//--- The array of strings for display labels. -// The order MUST match the order in ENUM_INFO_ROWS. -string init_str[ROW_TOTAL_COUNT]= - { -// --- I. Basic Account Information --- - "I. Basic Account Information", - "Login", - "Name", - "Server", - "Company", - "Currency", - "Currency Digits", - -// --- II. Financial Status and Balances --- - "II. Financial Status and Balances", - "Balance", - "Credit", - "Profit", - "Equity", - -// --- III. Margin and Risk Management --- - "III. Margin and Risk Management", - "Margin", - "Free Margin", - "Margin Level", - "Margin Call", - "Margin StopOut", - -// --- IV. Trading Modes and Rules --- - "IV. Trading Modes and Rules", - "Trade Mode", - "Leverage", - "Margin Mode", - "Stopout Mode", - "FIFO Close", - "Hedge Allowed", - -// --- V. Trading Permissions --- - "V. Trading Permissions", - "Trade Allowed", - "Trade Expert" - }; -//+------------------------------------------------------------------+ -//+------------------------------------------------------------------+ diff --git a/Scripts/MyScripts/SymbolInfoDescriptions.mqh b/Scripts/MyScripts/SymbolInfoDescriptions.mqh deleted file mode 100644 index f3b62c2..0000000 --- a/Scripts/MyScripts/SymbolInfoDescriptions.mqh +++ /dev/null @@ -1,106 +0,0 @@ -//+------------------------------------------------------------------+ -//| SymbolInfoDescriptions.mqh | -//| Helper functions for symbol properties | -//+------------------------------------------------------------------+ - -//--- Returns a string description for a given sector ID -string GetSymbolSectorDescription(const int sector_id) - { - switch((ENUM_SYMBOL_SECTOR)sector_id) - { - case SECTOR_UNDEFINED: - return("Undefined"); - case SECTOR_BASIC_MATERIALS: - return("Basic materials"); - case SECTOR_COMMUNICATION_SERVICES: - return("Communication services"); - // ... a többi case ... - default: - return("Unknown Sector ID (" + (string)sector_id + ")"); - } - } - -//--- Returns a string description for a given industry ID -string GetSymbolIndustryDescription(const int industry_id) - { - switch((ENUM_SYMBOL_INDUSTRY)industry_id) - { - case INDUSTRY_UNDEFINED: - return("Undefined"); - case INDUSTRY_AGRICULTURAL_INPUTS: - return("Agricultural inputs"); - case INDUSTRY_ALUMINIUM: - return("Aluminium"); - // ... a többi, több száz case... - default: - return("Unknown Industry ID (" + (string)industry_id + ")"); - } - } - -//--- MODIFICATION: New helper function to format the integer value -// This function encapsulates the large switch block from OnStart() -string FormatIntegerValue(CSymbolInfo &symbol_info, ENUM_SYMBOL_INFO_INTEGER property, long value) - { - switch(property) - { - case SYMBOL_TRADE_CALC_MODE: - return(symbol_info.TradeCalcModeDescription()); - case SYMBOL_TRADE_MODE: - return(symbol_info.TradeModeDescription()); - case SYMBOL_TRADE_EXEMODE: - return(symbol_info.TradeExecutionDescription()); - case SYMBOL_SWAP_MODE: - return(symbol_info.SwapModeDescription()); - case SYMBOL_SWAP_ROLLOVER3DAYS: - return(symbol_info.SwapRollover3daysDescription()); - case SYMBOL_SELECT: - return(symbol_info.Select() ? "True" : "False"); - case SYMBOL_VISIBLE: - return((bool)value ? "True" : "False"); - case SYMBOL_CUSTOM: - return((bool)value ? "True" : "False"); - case SYMBOL_EXIST: - return((bool)value ? "True" : "False"); - case SYMBOL_SPREAD_FLOAT: - return(symbol_info.SpreadFloat() ? "True" : "False"); - case SYMBOL_MARGIN_HEDGED_USE_LEG: - return(symbol_info.MarginHedgedUseLeg() ? "True" : "False"); - case SYMBOL_START_TIME: - return(TimeToString(symbol_info.StartTime(), TIME_DATE | TIME_SECONDS)); - case SYMBOL_EXPIRATION_TIME: - return(TimeToString(symbol_info.ExpirationTime(), TIME_DATE | TIME_SECONDS)); - case SYMBOL_TIME: - return(TimeToString(symbol_info.Time(), TIME_DATE | TIME_SECONDS)); - case SYMBOL_TIME_MSC: - { - datetime seconds_part = (datetime)(value / 1000); - long milliseconds_part = value % 1000; - return(StringFormat("%s.%03d", TimeToString(seconds_part, TIME_DATE | TIME_SECONDS), milliseconds_part)); - } - case SYMBOL_DIGITS: - return((string)symbol_info.Digits()); - case SYMBOL_SPREAD: - return((string)symbol_info.Spread()); - case SYMBOL_TICKS_BOOKDEPTH: - return((string)symbol_info.TicksBookDepth()); - case SYMBOL_TRADE_STOPS_LEVEL: - return((string)symbol_info.StopsLevel()); - case SYMBOL_TRADE_FREEZE_LEVEL: - return((string)symbol_info.FreezeLevel()); - case SYMBOL_VOLUME: - return((string)symbol_info.Volume()); - case SYMBOL_VOLUMEHIGH: - return((string)symbol_info.VolumeHigh()); - case SYMBOL_VOLUMELOW: - return((string)symbol_info.VolumeLow()); - case SYMBOL_SECTOR: - return(GetSymbolSectorDescription((int)value)); - case SYMBOL_INDUSTRY: - return(GetSymbolIndustryDescription((int)value)); - // For any other property, just convert the long value to a string - default: - return((string)value); - } - } -//+------------------------------------------------------------------+ -//+------------------------------------------------------------------+