Errors, bugs, questions - page 593

 

Decided to look at one of my old developments and... Can you tell me what this error means?

---

Initialization of the Expert Advisor is successful. When I try to open the info panel, I get a surprise. Where to look for the reason? ))

 
tol64:

Decided to look at one of my old developments and... Can you tell me what this error means?

---

Initialization of the Expert Advisor is successful. When I try to open the info panel, I get a surprise. Where to look for the reason? ))

We must locate the problem. I was in a similar situation, put Prints and look where it flies out. And then either servicedesk or on the forum. Or maybe you will find the error yourself.
 
Valmars:
We have to localize the problem. In a similar situation, I put Prints and look where it flies out. And then either to servicedesk or on the forum. Or maybe you will find the error yourself.

I'll have to print where I haven't doprinted. )) Can't the developers tell from this picture code where the legs are growing from? We need a hint. Although a new code is always generated there. Here is another example:

 
tol64:

We will have to print where not doprinted. )) Can't the developers tell from this picture code where the legs are growing from? We need a hint. Although a new code is always generated there. Here is another example:

The developers will in any case ask to localise everything, create an application in the SD, attach an expert and describe everything in as much detail as possible.

That's why they are developers (you know them) and telepaths are resting today. :)

 
After copying a dynamic array some_ array_1 declared as some_ array_1[], which was not allocated memory, to a dynamic array some_ array_2[], which was allocated memory using ArrayResize(some_ array_2, some_ array_2_quantity), the ArrayCopy(some_ array_1, some_ array_2) operator finds out that the number of elements in some_ array_1 is not 0, but some_ array_2_quantity. This is a serious error because the array some_ array_1[] is not allocated memory. Please fix it so that the array size in this situation does not change by itself and the compiler generates an error.
Документация по MQL5: Основы языка / Типы данных / Объект динамического массива
Документация по MQL5: Основы языка / Типы данных / Объект динамического массива
  • www.mql5.com
Основы языка / Типы данных / Объект динамического массива - Документация по MQL5
 
Interesting:
To the developers.

After switching to the new build (555), the terminal has stopped saving the position (correct activity status) for "Tools", "Market Watch", "Tester" and"Data window".

After the terminal has been closed and opened again (not minimised, but closed) everything outside the main form disappears. As I understand, terminal thinks for some reason that trader did without these things. I have to go to menu and turn everything on again (good thing is that at least location is remembered).

The "Navigator" is located, as always, along with the charts in the main form window, it's fine.

The OS is Win XP32, Bild 555, I have two monitors. On one main window (on which navigator and charts), and on the second all above mentioned ("Tools", "Market Watch", "Tester" and "Data window").

PS

I cannot say about x64 and other OSes, I have no possibility to check it on two monitors.

Same crap on 7 on one monitor. Reinstalling it helped. Also terminal confuses folders in Roaming for different terminals after reinstallation.
 
-Alexey-:
After copying of a dynamic array some_ array_1 declared as some_ array_1[], which was not allocated memory, to a dynamic array some_ array_2[], which was allocated memory with ArrayResize(some_ array_2, some_ array_2_quantity), using operator ArrayCopy(some_ array_1, some_ array_2) it turns out that the number of elements in some_ array_1 is not 0, but some_ array_2_quantity. This is a serious error because the array some_ array_1[] is not allocated memory. Please fix it so that the array's size will not change by itself in this situation and the compiler will generate an error.

There is no error, the ArrayCopy function will allocate memory of the dynamic array by itself to the size of data being copied.

This is not a bug, but a feature.

 
Urain:

There is no bug, the ArrayCopy function allocates the memory of the dynamic receiver array by itself.

This is not a bug, but a feature.

Because of this feature, you can easily make algorithmic errors by accident or by algorithm's error. And then you'll never find it and never know when there's an error. I've found an error only when I've translated a program into C++ because the compiler is an error-detecting assistant there. So I think it's more of a bug than a feature. IMHO!
 
-Alexey-:
Because of this feature, it's easy to make algorithmic errors - either by accident or because the algorithm is flawed. And then you can never find and never know that there are errors. I've found an error only when I've translated a program into C++ because the compiler is an error-detecting assistant there. So I think it's more of a bug than a feature. IMHO!
ArrayCopy is not the only function that allocates memory, all Copy functions take care of arrays themselves, so be careful and read the manual.
 

How is it that TimeCurrent() is less than the last time series value?

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {

   Print("time[rates_total-1] = ",time[rates_total-1]); 
   Print("TimeCurrent()         = ",TimeCurrent());  

   return(rates_total);
  }
TimeCurrent()         = 2011.12.09 18:47:29
time[rates_total-1]  = 2011.12.09 23:00:00
Reason: