
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
What "underlying ushort" ? You are working with a string if you want it in ushort you need to converted it (copy). You can use StringToShortArray() for that.
Use supported .NET version and you will avoid a lot of trouble. You should never rely on Metaquotes as you never know if and when they will add/fix what you want.
The performance bottleneck problem I described in this post:
https://www.mql5.com/en/forum/388556#comment_27648029
applies to all supported C# .DLL versions.
Could this be added to the Dev team to fix when you get around looking into C# .DLLs please? Thanks
I'll definitely use workaround in the mean time to minimize performance overhead. Note, this issue doesn't occur for C++ DLLs.What "underlying ushort" ? You are working with a string if you want it in ushort you need to converted it (copy). You can use StringToShortArray() for that.
Use supported .NET version and you will avoid a lot of trouble. You should never rely on Metaquotes as you never know if and when they will add/fix what you want.
Internally MQL5 uses ushort for each character in the string.
Forum on trading, automated trading systems and testing trading strategies
Sharing C++ DLL, C# DLL and EX5 among multiple EA/Service
bot, 2022.02.11 21:27
Tried both, still the strings are getting copied each time.
Note, I can get references passed for arrays of int, double etc, but not string. string is very critical to have good performance as it is always needed.
A question I have is, is it possible to get the ushort[] array for the MQL5 string?
since MQL5 is nicer to c++ dlls.
But since performance is critical, I would opt to just write the entire DLL in C++ and avoid the headache.
The performance bottleneck problem I described in this post:
https://www.mql5.com/en/forum/388556#comment_27648029
applies to all supported C# .DLL versions.
Could this be added to the Dev team to fix when you get around looking into C# .DLLs please? Thanks
I'll definitely use workaround in the mean time to minimize performance overhead. Note, this issue doesn't occur for C++ DLLs.