Forum

Wrong description in documentation about multidimensional arrays

Hi The article about multidimensional arrays has a mistake. https://www.mql5.com/en/articles/567 It should be the other way around. The first index contains the number of ROWS. The second index contains the number of COLUMNS. double Variable[ 10 ][ 3 ] ==> double Variable[3][10]

Rename MQL4/5 data folder (Windows 10)

Hi Is it possible to rename the MQL data folder to use normal broker names? (Windows 10) These names (2 different brokers) are very confusing. The old system in Windows 7 is more practical were the MQL4/5 is stored in the "c: program files" directory

MT4 variant for MT5 SymbolIsSynchronized() function.

Hi all. I'm making a custom indicator in MT4 and MT5 using the SymbolIsSynchronized(). The indicator uses the data of multiple Indexes. But this function does not work with MT4. Is there a substitute MT4 variant for this function

Need help for calculating relative price Index basket

Hi all. I'm trying to built a 'relative price index' based on a number of major world Indexes: S&P500, DAX30, EUR50, CAC40, SWISS20, JPN225 and UK100. My problem is that the calculated output is not reliable. Sometimes it works but often the indicator skips data and the average price is not correct

How to effectively add a "0" before the hour or minute to a string variable for displaying the time, when using "MqlDateTime" variable?

Hi I use some code for showing the current and past time when my EA performs an action or event. It converts the time from a MqlDateTime variable to a string variable with this format: "HH:MM" When the hour or minute is before 10, it adds an extra "0" to the string, see the code

Is it possible to make a struct with contain static variables

Hi I try to make a struct with contains static variables but I get this error in the compiler: "struct has no members, size assigned to 1 byte" "unresolved static variable "myData::Var1" "unresolved static variable "myData::Var2" "unresolved static variable "myData::counter" Is it possible to store

Compilation error in MT4 not MT5 why?

Hi all. I have a mqh file with this example. When I compile this code in MT4, the compiler gives the error: "'i' - variable already defined" But when I compile this in MT5 everything is oke. Why does the MT4 compiler generate this error and the MT5 compiler not. The "i" variable is declared inside

Passing a struct as argument into a function. Is it possible?

Hi. I'm going to build a function (mqh) file which uses a lot of different variables and data types. Is it possible to combine these variables into a struct and pass the structure itself as a parameter into a function? This example is not working. void example( struct data) export { } How can

Strange behaviour of the NormalizeDouble() function.

Hi I use some notification alerts in my EA for displaying variables. See the picture. To minimize the number of decimal numbers I use the NormalizeDouble() function to decrease the number of decimals to 2. NormalizeDouble(dPosition_Trend_RendementRatio,2) But sometimes. This function does not work

Does anyone know a good copy tool to duplicate code to another terminal?

Hi all. I have 5 terminals running on my pc. When I have update/improve the code of my EA, I need to copy manually this code to the other four 4 terminals (with the windows explorer). Is it possible to do this automatically with a copy program? Does anybody has experience with this? Thanks