Download MetaTrader 5

code debugging question

To add comments, please log in or register
Sign up to publish an article and receive 200 USD
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 10:09 

Hello,

Please give me some points to resolve this issue:

I've downloaded a free EA. It has a lot of files spreaded in Experts, Indicators, Include, Images folders.

I've installed it with no errors. It works. The only problem is that: in places where are buttons it did not display the button images, but it display an empty square. Buttons are functional.

Please advice me where/how can I discover and resolve this little problem.

Thanks in advance ! 

Stanislav Korotky
17925
Stanislav Korotky 2014.08.20 10:46  
It's possible that the setup pack should have corresponding images which must be placed in MQL*/Images folder. If they are missing ask the author/distributor. But there may be other reasons. Do you have some errors in logs?
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 11:43  
marketeer:
It's possible that the setup pack should have corresponding images which must be placed in MQL*/Images folder. If they are missing ask the author/distributor. But there may be other reasons. Do you have some errors in logs?
The images are in Images folder but as I said, are not displayed. What is the name and in which folder are errors log written?
Alain Verleyen
Moderator
30743
Alain Verleyen 2014.08.20 12:00  
tenlau:
The images are in Images folder but as I said, are not displayed. What is the name and in which folder are errors log written?
Is it an EA from the Codebase ?
Stanislav Korotky
17925
Stanislav Korotky 2014.08.20 12:19  
tenlau:
The images are in Images folder but as I said, are not displayed. What is the name and in which folder are errors log written?
Logs are shown in the Experts tab of the Toolbox sub-window, but there can be skipped lines there for performance reasons. The log are also written into files in the MQL*/Logs folder (without any omissions), but there is a delay between the moment when new records are added into the log and when they are actually written into the files due to the caching (again for preformance reasons). So you should open content menu in the tab and click Open command - then the cache is flushed to the disk and the log files become actual up to the latest moment.
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 12:38  

angevoyageur:
Is it an EA from the Codebase ?  

https://www.mql5.com/ru/code/221 , and I am talking about buttons from the right panel (Trading panel)
TradeXpert
TradeXpert
  • votes: 24
  • 2010.12.16
  • Андрей
  • www.mql5.com
Панель управления для участия в конкурсе.
Alain Verleyen
Moderator
30743
Alain Verleyen 2014.08.20 13:10  
tenlau:
https://www.mql5.com/ru/code/221 , and I am talking about buttons from the right panel (Trading panel)

This code is a little buggy (it doesn't check for errors). You have to place the images in the same folder as the EA.

Or modify the code to include the path when loading images : "\\Images\\"+<name of image>

Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 13:17  
tenlau:
https://www.mql5.com/ru/code/221 , and I am talking about buttons from the right panel (Trading panel)

And I also notice that Reverse trade works only if it is BUY position opened.(if it is open a BUY volume=1,  clicking on Reverse will make a SELL with volume=1)

If it is SELL it opens a double position in the same direction. I mean: if it is opened a SELL with volume=1, clicking on Reverse will make a SELL with volume=3

Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 13:26  
angevoyageur:

This code is a little buggy (it doesn't check for errors). You have to place the images in the same folder as the EA.

Or modify the code to include the path when loading images : "\\Images\\"+<name of image>

I put the images on the same file as EA. It works.

Regarding the other way, what is the name of the file that has to be modified to include the path ? 

Alain Verleyen
Moderator
30743
Alain Verleyen 2014.08.20 13:36  
tenlau:

I put the images on the same file as EA. It works.

Regarding the other way, what is the name of the file that has to be modified to include the path ? 

All the files for each object using an image. Each time OBJPROP_BMPFILE is used, I give you an example line 602 of TradePane.mqh :

   bool ret=ObjectSetString(0, m_BuyWithTP, OBJPROP_BMPFILE, 0, "\\Images\\BuyTP" + light + ".bmp");
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.20 13:40  
angevoyageur:

All the files for each object using an image. Each time OBJPROP_BMPFILE is used, I give you an example line 602 of TradePane.mqh :

Got it.

Please because you looked at code indicate how to fix the "Reverse button" issue.

To add comments, please log in or register