ChartApplyTemplate bug on 2560 build?

To add comments, please log in or register
fsbx
17
fsbx  

Hi,


I have some EAs and today they started having a strange behavior, after updating to 2560.


Every hour I reapply the templates (because some indicators get bugged), and it was working with no problems until today.


Now every time I apply template, the graph window splits and creates another graph (like the image in the left). If I close the program and apply the templates, it works correctly, but the 2nd time, it splits.. and continue splitting every time I use ApplyTemplates.



My function is:

void ApplyTemplate(long idChart, string fileName)
{
   if (idChart > 0)
   {
      string dirFilename = "\\Files\\" + fileName;
      int sleep = GetSleepByCPU(3);
     
      if (FileIsExist(fileName))
      {
         if (GetExpertAttached(idChart, "") == "")
         {
            Sleep(sleep);
            ChartApplyTemplate(idChart, dirFilename);
            ChartRedraw(idChart);
            Sleep(sleep);
         }
      }
   }
   else
   {
      Print("ApplyTemplate: IDChart is not valid.");
   }
}
Files:
Keith Watford
Moderator
24857
Keith Watford  
Please edit your post and
use the code button (Alt+S) when pasting code
fsbx
17
fsbx  
If this is the new behavior of the function ApplyTemplates (creating a new window), it should have a boolean parameter asking if I really want to create a new window, or apply my original template in the single window.
Peter Thomet
171
Peter Thomet  

Now every time I apply template, the graph window splits and creates another graph (like the image in the left). If I close the program and apply the templates, it works correctly, but the 2nd time, it splits.. and continue splitting every time I use ApplyTemplates.

Exactly, what a mess! They broke my nice "Forex Arranged" system available free on my GitHub account:

https://github.com/peterthomet/MetaTrader-5-and-4-Tools




Sergey Golubev
Moderator
117577
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform build 2560: Built-in learning system improvements

Sergey Golubev, 2020.07.28 18:19

The possible issue with ChartApplyTemplate was already reported by several posts and one thread in Russian forum (for example, this thread).

By the way, my MT5 was updated to the beta build 2561:


And this user (OP, means: the user who started this thread) replied that it was corrected:

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform build 2560: Built-in learning system improvements

fsbx, 2020.07.28 19:09

Nice. The AppyTemplate bug was corrected on 2561.


Now I need to debug the FileRead.


Peter Thomet
171
Peter Thomet  
Thanks Sergey for the hint to fix this bug by installing beta versions. This saved my weekend :)
To add comments, please log in or register