
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
And then... in software development, it is considered a good tone to have no crash screens.
And that's what we're dealing with.
You have to reproduce the error to fix it. I would like to see your agents logs. It would be good if you could send your expert. And describe the input testing parameters.
It must be the minute timeframe instead of the other selections when"every tick" is on.
I just have minute timeframe everywhere and everything seems ok.
P.S. I wrote above.
If the FILE_SHARE_READ flag is an open flag and not the open flag itself, why does the file open anyway?
It seems to me that the result should be a file opening error.
And in fact it is, because nothing is printed, but checking the handle shows that the file is open.
The picture is added to EX5 resource by
#resource "<path to file relative to folder MQl5\Images>".
Example
#resource "res\\test.bmp";
Is everything in place? I'm looking for path if #resource in EA's file, relative to EA's source directory.
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\Experts\myexpert\res\\test.bmp' (3) 0 0
If #resource is in the file of the injection, everything goes in one place and gets into folders of other inludes.
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\include\Arrays\res\test.bmp' (3) 0 0
The next variant searches from the "root" of MQL5
#resource "\\res\\test.bmp";
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\res\test.bmp' (3) 0 0
I also see that things that used to work do not work either (the file lying in MQL5/Images/res/test.bmp).
Did I miss something?
Example
Is everything in place? I'm looking for path if #resource in EA's file, relative to EA's source directory.
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\Experts\myexpert\res\\test.bmp' (3) 0 0
If #resource is in the_include file, everything goes in one place and gets into folders of other inludes.
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\include\Arrays\res\test.bmp' (3) 0 0
The next variant searches from the "root" of MQL5
cannot open resource file 'C:\Program Files\MetaTrader 5 DEV\MQL5\res\test.bmp' (3) 0 0
I have also noticed that something that used to work does not work either (file is MQL5/Images/res/test.bmp).
Did I miss something?
I think it should be
MetaTrader 5 Client Terminal build 384
- Terminal: Added wizard for adding remote testing agents. In addition to manual input and import from *.mt5 file, added possibility to scan a local network for finding a working agent.
- MQL5: Added possibility to store resources in *.ex5 files. To add a resource to *.ex5, use the #resource directive specifying the path to the file relative to the MQL5\Images directory of the client terminal. For example:#resource myexpert\button.bmp
If understood correctly, the files can be located here - MQL5\Images\Directory name/file name.Files in the resource can be referred to by a string like: "script_name::resource_name". The file name (without an extension) passed in the #resource directive is used as the resource name.
It looks like this
MetaTrader 5 Client Terminal build 384
relative to the MQL5\Images directory of the client terminal. For example:#resource myexpert\button.bmp
This is relative and it doesn't work. and you can't do it without quotes. and backslash is double.
Let's check it out.
That's how #resource "\\Images\\\\Phoenix\\Logo.bmp" seems to work;
Although it looks strange (according to the idea, it should search relatively for MQL5\Images, i.e. at least it should look like this - #resource "\\\\Phoenix\\\Logo.bmp").
Either make it relative to the Images directory or correct the release description (to make everything logical and understandable)...
And, as I wrote, OBJPROP_BMPFILE with relative path from the Images folder doesn't work either. In general, according to the latest experiments, everything works when the full path is specified starting from \ from MQL5.
The question was whether this innovation is valid? Or is it a temporary phenomenon?
I had an example in my comment about MQL5 folder. By the way, I have log messages there and it clearly shows WHERE the compiler searches for files.
Hello !
Code:
{
double Position_In_Percentage = Prices_Flow[0].Indicator_Position * 100 / Prices_Flow[0].Price_Position;
//further code irrelevant to the question
}
When testing in the Strategy Tester at the same time on one of the tools the division by zero occurs (2011.02.08 01:40:23 Core 2 2010.08.02 00:00:00 Zero divide in 'almirlib.mqh' (535,102))
How with the above code is this possible ?