Errors, bugs, questions - page 2646
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
because the template only outputs types by parameter, not by output value.
This is not accurate.
That's not accurate.
Thank you!
Yes, it will work, got confused in the syntax
ZS: everything as intended now works:
Base64 serialisation of POD structuresThat's not for sure.
No, it's not. You noted the explicit setting of template parameter types in the function, and I was talking about output, about the explicit setting fxsaber answered before me. and before you
No, that's right. You noted the explicit setting of template parameter types in the function, and I was talking about output, about the explicit setting fxsaber answered before me. and before you
I couldn't find it on the forum or in the docs, so I have a question:
1. what is the maximum size of string that MQL5 can store?
2. what is the maximum size of string that MQL4 can store?
3. if there is a memory shortage, this max. size will be reduced (or no memory allocated for string) or will there be a runtime error ?
Defects:
(not fixed by MT5(build 2319)) bug in template class cache operation: "You create complex wrapped object with internal type "C" several times, and it turns out to be quite different data type, maybe "B", maybe "int", whatever you want...".
(not fixed by MT5(build 2319)) bug with template class code generation when using internal class.
(not fixed MT5(build 2319)) bug when defining internal class - no ability to explicitly reference global namespace when specifying a base class.
Suggestions:
ref - about the need to introduce typedef declaration functionality in MQL.
Reference- to allow to force generation of default copy constructors and assignment operators.
Defects:
Good on you for keeping track of your bug reports. I didn't, that's why everything got irretrievably lost in the forum.
Maybe you should add some of the same hash record to your bug report posts, so you can search for them all at once.
I couldn't find it on the forum or in the docs, so I have a question:
1. what is the maximum size of string that MQL5 can store?
2. what is the maximum size of string that MQL4 can store?
3. if there is insufficient memory this max. size will be reduced (or no memory allocated for string) or will there be a runtime error ?
tried to test a string in MT4
The memory leaks slowly (5.1 out of 11.9), in MT4 in the log:
StringLen = 221696000 , m_physical = 12157, m_total = 4095, m_available = 3365, m_used = 729
in general, for sensible tasks, you can use big string, maybe later I will copy the file through a string to check
UPD: replaceduchar u_arr[102400]; by uchar u_arr[524224]; to speed up process
Bottom line: in MT4, the approximate maximum that can be put in string is:
2020.02.13 21:11:24.177 tst_string EURUSD,H1: out of memory
2020.02.13 21:11:24.024 tst_string EURUSD,H1: StringLen = 640601728 , m_physical = 12157, m_total = 4095, m_available = 2556, m_used = 1539
i.e. about 640 MB
SZZ: MT5
2020.02.13 21:56:12.964 tst_string (EURUSD,H1) StringLen = 1073610752 , m_physical = 12157, m_total = 24314, m_available = 21975, m_used = 2339
2020.02.13 21:56:13.140 tst_string (EURUSD,H1) out of memory in 'tst_string.mq5' (41,12)
tried to test string in MT4
The memory is leaking a little bit in Win Manager (5.1 out of 11.9) , in MT4 in the log:
StringLen = 221696000 , m_physical = 12157, m_total = 4095, m_available = 3365, m_used = 729
in general, for sensible tasks, you can use big string, maybe later I will copy the file through a string to check
UPD: replaced uchar u_arr[ 102400 ]; by uchar u_arr[524224]; to speed up process
Bottom line: in MT4 the approximate maximum that can be put in string is:
2020.02.13 21:11:24.177 tst_string EURUSD,H1: out of memory
2020.02.13 21:11:24.024 tst_string EURUSD,H1: StringLen = 640601728 , m_physical = 12157, m_total = 4095, m_available = 2556, m_used = 1539
i.e. about 640 MB
SZZ: MT5
2020.02.13 21:56:12.964 tst_string (EURUSD,H1) StringLen = 1073610752 , m_physical = 12157, m_total = 24314, m_available = 21975, m_used = 2339
2020.02.13 21:56:13.140 tst_string (EURUSD,H1) out of memory in 'tst_string.mq5' (41,12)
This is string length for Unicode, so in MB it is at least double. 1.3 GB for MT4, which makes sense since you need a continuous memory buffer and MT4 is a 32 bit application. Thus the mql4 limitation is not a limitation in itself, but is only limited by the available memory.
I'm a bit surprised that MT5 doesn't allow more, as it seems like you have a lot of available memory. I'll try my best on my side.
This is the string length for Unicode, so in MB it is at least double. 1.3 GB for MT4, which makes sense since you need a continuous memory buffer and MT4 is a 32 bit application. So the limitation of mql4 itself is not a limitation, it is only limited by the available memory.
I'm a bit surprised that MT5 doesn't allow more, as it seems like you have a lot of available memory. I'll try my best on my side.
i have 12gb of memory, Windows 10 , free memory about 8gb
i needed this test to find out the maximum allowed line lengths in mt4/ mt5 terminals
I now want to exchange between terminals via the Redis database
Redis is a very simple database and works only with strings (key - value --> strin - string)
Yesterday I've serialized POD structures in Base64 and it increases data size by about 1/3
I think that even in this case I have a possibility to exchange structures with size of 400 Mb per transaction - that's more than enough for any purpose! ;)