MetaTrader 5 Platform build 5326: Improvements and fixes - page 3

 
Dominik Egert #:

Found a casting bug:


Reference is documentation:

https://www.mql5.com/en/docs/basis/types/casting

Failing code example:


Compiler log:


The following code does successfully compile and run in C++:

template <typename T>
T test_ptr(T p) { return p; }

void xxx()
{
   printf("%i", test_ptr(int(NULL)));
   printf("%i", test_ptr((int)NULL));
}

int main()
{
    xxx();
    return 0;
}

Both casting syntaxes should do the same thing, but they don't in MQL5.

So the compilation error in MQL5 is just an idiosyncrasy of MQL5. It should work normally, IMHO.

 
Stanislav Korotky #:

The following code does successfully compiles and runs in C++:

So the compilation error in MQL5 is just an idiosyncrasy of MQL5. It should work normally, IMHO.

Obviously.
 
For long time now, the window size and screen position is rarely remembered when mt5 is closed. When will this be fixed?
 
Michael Charles Schefe #:
For long time now, the window size and screen position is rarely remembered when mt5 is closed. When will this be fixed?
That seems something specific, as I don't have such issue.
 
Alain Verleyen #:
That seems something specific, as I don't have such issue.

in last 3 years i have and intel system with 12450h cpu,  amd 7940HS cpu, amd 5600X cpu; and all these systems rarely have the former window position and size when i open mt5, as i did when i closed it.

Sometimes it will remember, but i do not know what that circumstance is when it will remember. That is how rare it happens. the current (mt5) window position and size, when i started up mt5 i have had for weeks now.

ie i have to change the position and size of my mt5 window on every Monday when my mt5 platforms start up for each new week -- and every other time that i am forced to restart windows after some forced update of windows or brief power outage etc etc.

EDIT: maybe it has something to do with my terminals being portable(s)?

 
Michael Charles Schefe #:

in last 3 years i have and intel system with 12450h cpu,  amd 7940HS cpu, amd 5600X cpu; and all these systems rarely have the former window position and size when i open mt5, as i did when i closed it.

Sometimes it will remember, but i do not know what that circumstance is when it will remember. That is how rare it happens. the current (mt5) window position and size, when i started up mt5 i have had for weeks now.

ie i have to change the position and size of my mt5 window on every Monday when my mt5 platforms start up for each new week -- and every other time that i am forced to restart windows after some forced update of windows or brief power outage etc etc.

EDIT: maybe it has something to do with my terminals being portable(s)?

Is it possible it happens when MT5 is not closed manually but forced to close by Windows (restart or shutdown) ? 
 
Michael Charles Schefe #and every other time that i am forced to restart windows

Unfortunately, MetaTrader does not do a "graceful" shutdown very well when initiated by the system and tends not to flush to disk.

Unless you manually close MetaTrader, it usually "forgets" all the current conditions.
 
Alain Verleyen #:
Is it possible it happens when MT5 is not closed manually but forced to close by Windows (restart or shutdown) ? 

no. that is why i explained ...on every Monday when my mt5 platforms start up...

Fernando Carreiro #:

Unfortunately, MetaTrader does not do a "graceful" shutdown very well when initiated by the system and tends not to flush to disk.

Unless you manually close MetaTrader, it usually "forgets" all the current conditions.

yeah. like i said, weeks with same, incorrect window size and position when i start up mt5.

Whether i manually close mt5 or not, same thing: mt5 opens at same position and size for weeks, and i have to resize it every time.

 
@Michael Charles Schefe #Whether i manually close mt5 or not, same thing: mt5 opens at same position and size for weeks, and i have to resize it every time.
Then it could be an issue with the disk flushing, such as a file that is set to read-only, or a directory that has the wrong permissions.
 
Fernando Carreiro #:
Then it could be an issue with the disk flushing, such as a file that is set to read-only, or a directory that has the wrong permissions.

agreed. but i dont have any idea how to fix "disk flushing", or even how to detect which file should be checked for wrong permission or which to check attributes. Any further advice how to go about either of these will be appreciated. And as i said, this is 3rd computer system i have had over 2.5/3 years with same issue. And while each system had Windows 11 pro, each system had a different version. not 1 of my installations were started from a same install disk or usb. so i dont think it could be blamed on windows either. 

my hard drives of all 3 have been nvme drives, so i definitely think that it could be disk flushing as the nvme firmware has evolved over years. Maybe i can find a windows setting to confirm that this flushing happens.