Yes - some functions may not be 100% reliable (in another thread there was a discussion of conversion functions which seem to be lacking, prompting many to write their own).
I suspect you need to consider FileIsExist() has such quirks and thus the workaround of reading the size could be a more reliable approach
So you say I need to become a "quirky coder" R4tna C? :-)
Jokes aside... Even if there were functions in the past lacking functionality, I still think it is a better idea to communicate the flaws / shortcomings of the platform - if they are legit - to the devs of MT5/MQL5.
This is normal behaviour using MQL5/Files with the Strategy Tester. The files there are deleted on each run, so your file never exists. I suppose it's written somewhere in the chaotic documentation.
If you want your file(s) to remain between different tester runs, then use the FILE_COMMON flag to use the common folder.
Hi Alain.
"normal behaviour" you say; I would never have thought? Is this then a flawed (IMO) feature? Would you perhaps know the reasoning behind implementing it in this manner? Apart from that file need to be handled within the sandbox. Or is it standard practice to use the common path as default?
B.T.W. You nailed it with the documentation-reference. :-) Cannot remember that I've read anything of the sort. Maybe I just missed it. Maybe it's not written (clearly) anywhere.
Anyways, thanks for confirming the craziness in all of this Alain. No more searching for a solution. Just separate sets of logic that run for each environment, addressing the respective paths.
So you say I need to become a "quirky coder" R4tna C? :-)
Jokes aside... Even if there were functions in the past lacking functionality, I still think it is a better idea to communicate the flaws / shortcomings of the platform - if they are legit - to the devs of MT5/MQL5.
Anyways, thanks again R4tna.
LMC
Not so much quirky, so often tech does not work as expected (even with the largest vendors) and often the anomalies never get fixed - so one has to find other ways
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Yes - some functions may not be 100% reliable (in another thread there was a discussion of conversion functions which seem to be lacking, prompting many to write their own).
I suspect you need to consider FileIsExist() has such quirks and thus the workaround of reading the size could be a more reliable approach
Jokes aside... Even if there were functions in the past lacking functionality, I still think it is a better idea to communicate the flaws / shortcomings of the platform - if they are legit - to the devs of MT5/MQL5.
Anyways, thanks again R4tna.
This is normal behaviour using MQL5/Files with the Strategy Tester. The files there are deleted on each run, so your file never exists. I suppose it's written somewhere in the chaotic documentation.
If you want your file(s) to remain between different tester runs, then use the FILE_COMMON flag to use the common folder.
Jokes aside... Even if there were functions in the past lacking functionality, I still think it is a better idea to communicate the flaws / shortcomings of the platform - if they are legit - to the devs of MT5/MQL5.
Anyways, thanks again R4tna.
Not so much quirky, so often tech does not work as expected (even with the largest vendors) and often the anomalies never get fixed - so one has to find other ways
All the best