MT4 build 1344 breaks windowfind()

 
windowfind works in mt4 build 1340, then in 1344, it gives always a +1 to its normal value, so now windowfin(name) must be windowfind(name)-1 to get back to the real value
 

I tested in build 1345:

I can confirm that both WindowFind and ChartWindowFind return the wrong number according to the documentation:

ChartWindowFind

...

Return Value

    Subwindow number in case of success. In case of failure the function returns -1.

void OnStart()
  {
//---
   Print(WindowFind("MA(21)"),",",ChartWindowFind(0,"MA(21)"));
   Print(WindowFind("RSI(14)"),",",ChartWindowFind(0,"RSI(14)"));
  }


0 18:57:13.649 Script _ Test\test-WindowFind GBPUSD,Daily: loaded successfully
0 18:57:13.661 test-WindowFind GBPUSD,Daily: initialized
0 18:57:13.662 test-WindowFind GBPUSD,Daily: 1,1
0 18:57:13.662 test-WindowFind GBPUSD,Daily: 2,2
0 18:57:13.662 test-WindowFind GBPUSD,Daily: uninit reason 0
0 18:57:13.663 Script test-WindowFind GBPUSD,Daily: removed


 
Mohammad Hossein Sadeghi #:

I tested in build 1345:

I can confirm that both WindowFind and ChartWindowFind return the wrong number according to the documentation:


0 18:57:13.649 Script _ Test\test-WindowFind GBPUSD,Daily: loaded successfully
0 18:57:13.661 test-WindowFind GBPUSD,Daily: initialized
0 18:57:13.662 test-WindowFind GBPUSD,Daily: 1,1
0 18:57:13.662 test-WindowFind GBPUSD,Daily: 2,2
0 18:57:13.662 test-WindowFind GBPUSD,Daily: uninit reason 0
0 18:57:13.663 Script test-WindowFind GBPUSD,Daily: removed


Having problems since some days to display objects in a subwindow.

On some MT4-versions it works on others not.

Maybe what you say is the problem.

How we can fix that if one clients terminal gives window number = 1 (sub-window) and another gives 2?

 

I just found this same problem. My indicator needs to draw buttons in subwindow 1 where the indicator is.

However, the WindowFind() says it finds the indicator in subwindow 2 which does not exist.

Hence i get the 4206 err and no buttons created.

The main chart is now window index 1 instead of window index 0. 

 
I made a provisional response only for build1345.
I think it may be fixed in the next build.

   int subWindowNo;
   subWindowNo = WindowFind("WindowName");
   if (TerminalInfoInteger(TERMINAL_BUILD) == 1345) {
      subWindowNo = subWindowNo - 1;
   }
Reason: