Errors, bugs, questions - page 1997

 
Slava:

Has been running since build 1565. Since March 2017.

GetLastError what does it return?

Helped to sort it out. It's hard to tell if this behaviour is correct, that without the presence of a folder, the template is not saved.

 
Slava:
The slash at the beginning of the file name means "from MQL5 root"

Thank you, I haven't seen that anywhere before.

 
fxsaber:

Thank you, I haven't seen that anywhere before.

What comes to mind first

path

[in] Relative path to the file containing the data for the resource. If the path starts with a backslash "\" (spelled "\\"), then the file is searched relative to terminal_data_directory\MQL5\ folder .If there is no backslash, the resource is searched relative to the location of the EX5 file from which the function is called.

There is also somewhere else...
Документация по MQL5: Общие функции / ResourceCreate
Документация по MQL5: Общие функции / ResourceCreate
  • www.mql5.com
Общие функции / ResourceCreate - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Slava:

Been working since build 1565. Since March 2017.

GetLastError what does it return?


Thank you...

 
Alexey Viktorov:

What comes to mind first

There's more somewhere...

Thank you, it hadn't occurred to me that this was a general rule.

 
Alexey Viktorov:

Perhaps your thoughts are about something else, but for this particular case, trivial inattention by the programmer led to this error.

Yes, I mean something else. If variables were forcibly initialized by MQL5 itself, the number of "tester gives different results" would decrease significantly. Now we have a lot of opportunities to write random Expert Advisors.

 
fxsaber:

If variables were forcibly initialized by MQL5 itself, then the number of "tester gives different results" would decrease significantly.

...and the speed of initialization would drop.

Obviously, in general case it would be insignificant, but still.

 
Andrey Khatimlianskii:

...and the initialisation rate would drop.

Clearly, in the general case it would be insignificant, but still.

That's why I'm only voicing my thoughts, but I'm not advocating this solution. Thanks to@Anton Ohmat for pointing out another side of random TCs.

 
Andrey Khatimlianskii:

...and the initialisation rate would drop.

Obviously, in the general case it would be insignificant, but still.

This is the argument I didn't understand (when it was put forward by MQ) and I don't understand it now. Initialization isn't going anywhere. Now it's entrusted to the application programmer and he does it anyway, but as practice shows, sometimes with errors. And if it were done by a kernel, the performance would not be affected and there would be no errors.

 
Stanislav Korotky:

This is the argument I didn't understand (when it was put forward by MQ) and I don't understand it now. Initialization is not going anywhere. Now it is entrusted to the application programmer and he does it anyway, but as practice shows, sometimes with errors. If it was done by a kernel, the performance would not be affected and there would be no errors.

Full initialization is not always necessary. For example, for the indicator that fills the buffer's value for each bar in the loop (and does it regardless of whether the indicator buffer is initialized or not).

In this case it would be more economical without forced zeroing.

Reason: