Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1031
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Press F3 in the terminal, and manually delete this variable. It is created once and it is located in environment - the EA reads it from there. Or maybe I did not understand you correctly? You just deleted the creation of a global variable of the terminal in the indicator code itself, but it was created by this indicator before?
Artem, please help me understand what's wrong. Here https://www.mql5.com/ru/code/10237 is the code of the Expert Advisor that notifies (or rather used to notify) about all trading events in the terminal. This code has been working properly. I have been absent from the website for a long time. Some changes in mql4 have occurred and now this code compiles with an error, when compiling the initialization lines of the array. If you can find the time, please take a look at it.
Regards.
ps if anyone else can look at what the problem is, i would appreciate it.
Well, I don't know, maybe in C++, which I never studied, but mql is only C-like. And secondly the array dimension cannot be set to a variable, although in your example MAX_NUM_ORDER might not be a variable...
A row and a column of the array are selected, respectively, one particular value can be entered there, i.e. the entry should be as for an ordinary variable, and to reset all values
ArrayInitialize(Arr_Tickets, 0);
the item reference will look like this -Arr_Tickets[MAX_NUM_ORDER,2] =0;
I have it here -Arr_Tickets[MAX_NUM_ORDER][2] = {0,0, ,0,0};
see here about array initialisation https://book.mql4.com/ru/variables/arrays
the item reference will look like this -Arr_Tickets[MAX_NUM_ORDER,2] =0;
I have it written -Arr_Tickets[MAX_NUM_ORDER][2] = {0,0, ,0,0};
Arr_Tickets[MAX_NUM_ORDER,2] - reference to an array element
Arr_Tickets[MAX_NUM_ORDER][2] - array element reference
The compiler does not swear however you write it and waits for one particular value, not something else. I checked it specially.
And a confirmation of the same from the link, which you gave to another forum member: the way of specifying indexes, when each of the indexes is enclosed in square brackets, is also acceptable
Arr_Tickets[MAX_NUM_ORDER,2] - reference to an array element
Arr_Tickets[MAX_NUM_ORDER][2] - reference to an array item
The compiler does not swear however you write it and waits for one particular value, not something else. I checked it specially.
And a confirmation of the same from the link, which you gave to another forum member: the way of specifying indexes, when each of the indexes is enclosed in square brackets, is also acceptable
I'll rephrase the question, - It used to compile and work fine, can anyone explain what's causing it? The codes that didn't work weren't allowed into the kodobase...
By the way, the error comes up in lines 53 and 54 of the code. In line 54 what is wrong? And then how to initiate a string array?
I searched through the textbook, but I didn't find anything about string arrays, there is information only about numeric arrays. Maybe I have not looked too hard? Please provide me with the link.
Artem, please help me understand what's wrong. Here https://www.mql5.com/ru/code/10237 is the code of the Expert Advisor that notifies (or rather used to notify) about all trading events in the terminal. This code has been working properly. I have been absent from the website for a long time. Some changes in mql4 have occurred and now this code compiles with an error, when compiling the initialization lines of the array. If you can find the time, please take a look at it.
Regards.
ps if someone else look at what the problem is, i would be grateful.
First-first insert #property strict at the beginning of the code and compile.
Was like this:
do so:
After that you need to look already at the errors it gives out.
First, insert #property strict at the beginning of the code and compile.
was like this:
do so:
After that you have to look at the errors it gives out.
Inserted, nothing has changed.
Suppose I can replace line Arr_Tickets[MAX_NUM_ORDER][2] = {0,0,,0,0}; I can also replace it withArrayInitialize(Arr_Tickets,0);
What to do with string Arr_Order_Symbol[MAX_NUM_SYMBOL] = {",",};? When I try to initialize a string array throughArrayInitialize(Arr_Order_Symbol,""), it says "my you don't understand...", there is no suitable object for processing by this function...
Inserted, nothing has changed.
Suppose I can replace line Arr_Tickets[MAX_NUM_ORDER][2] = {0,0,,0,0}; I can still replace it withArrayInitialize(Arr_Tickets,0);
What to do with string Arr_Order_Symbol[MAX_NUM_SYMBOL] = {",",};? When I try to initialize a string array throughArrayInitialize(Arr_Order_Symbol,""), it says "my you don't understand...", there is no suitable object for processing by this function...
Well zero this array: ZeroMemory()