Errors, bugs, questions - page 2238
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
It happens that the last tick received 16 seconds ago is not seen as relevant to OrderSend. This must be a bug after all.
This bug
Forum on trading, automated trading systems & strategy testing
Libraries: MT4Orders
fxsaber, 2018.07.24 09:46
In about a minute you can reproduce with this script on ForexTimeFXTM-Demo01 if you enable all symbols in Market Overview before running.
This is a system limitation (WinAPI).
Here are the correct flags to make your code work:
come on )
we checked - Windows can open the file, but the script cannot. the problem is with the FILE_SHARE_READ flag
Please fix FileLoad
Thanks for the post.
Added FILE_FLAG_SHARE_READ | FILE_FLAG_SHARE_WRITE flags to FileLoad/FileSave function implementation
Be careful, when writing and reading the same file at the same time, the synchronisation has to be organised correctly, because the result of reading will be undefined.
Thanks for the message.
Added FILE_FLAG_SHARE_READ | FILE_FLAG_SHARE_WRITE flags to FileLoad/FileSave function implementation
Be careful, when writing and reading the same file at the same time, the synchronisation has to be organised correctly, because the result of reading will be undefined.
Thanks for the correction, the timing rake shouldn't be affected.
come on )
The problem is with the FILE_SHARE_READ flag.
I recommend reading https://docs.microsoft.com/en-us/windows/desktop/FileIO/creating-and-opening-files
I recommend reading https://docs.microsoft.com/en-us/windows/desktop/FileIO/creating-and-opening-files
How to deal with this fact?
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2018.07.23 16:48
Clearly a bug as with such flags third party applications read the file without any problem.
Such files.
I view in TotalCommander without FileClose. Without FILE_SHARE_READ it doesn't work.
I recommend reading it
Yes, I was just about to throw in.
I admit I was wrong. if the first handle is open for writing, the second must add the FILE_SHARE_WRITE flag
but there is another comment from a100 that has no record at allThe opener cannot use the FILE_SHARE_WRITE (allow writing) flag for reading, because there is a writer.
This is a system limitation (WinAPI).
Here are the correct flags at which your code will work:
I read MSDN too. Explain, is it Microsoft doesn't know English or they don't read their documentation themselves, or is it the last option - the flags in MQL are named similar to WinApi but work in a different way?
Taken from here - https://docs.microsoft.com/en-us/windows/desktop/api/FileAPI/nf-fileapi-createfilea
FILE_SHARE_READ -Enables subsequent open operations on a file or device to request read access.Otherwise, other processes cannot open the file or device if they request read access.
FILE_SHARE_WRITE -Enables subsequent open operations on a file or device to request write access.Otherwise, other processes cannot open the file or device if they request write access.
Therefore, the first program only needs to set FILE_SHARE_READ for the second to read. FILE_SHARE_WRITE must be set only if it is known that the second program will also write to the file.
Question for the developers.
There is a synchronisation function:
I sometimes get this error with it:
I.e. the indicator runs on USDJPY, and I get an error with EURGBP symbol. At the same time there is an open EURGBP chart in the terminal.
Error 4014 says that:
System function is not allowed to be called
How can it be?
Yes, I was just about to throw in.
I admit I was wrong. if the first handle is open for writing, the second must add FILE_SHARE_WRITE flag
but there is also a comment from a100 that has no record at all.