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
HH: I don't know how to pass price[] into C#without copying - any options?
ArraySwap.
ArraySwap.
Alas, it didn't work, compiler still traces const ( 'price' - constant variable cannot be passed as reference Momentum_DLL.mq5 57 17 )
Here are 2 calculation functions in C# oncalculate, one needs to pass by reference ( ref ) an array price, the second just passes an array as a parameter ( without ref ), I haven't managed to win without copying - I wrote in the MQL comment the function signature
Alas, it didn't work, compiler still traces const ( 'price' - constant variable cannot be passed as reference Momentum_DLL.mq5 57 17 )
Here are 2 calculation functions in C# oncalculate , one pass by reference ( ref ) the price array, the second one just pass the array as a parameter ( without ref ), I haven't managed to win without copying yet - I wrote in the MQL comment of the function signature
ME shows no const in the signature.
ME shows that there is no const in the signature.
Yes, that's right, it's a feature of C# to prohibit writing const in the signature
http://qaru.site/questions/672666/const-function-parameter-in-c
and the MQL feature is to forbid passing arrays by parameter, i.e. only by reference
Yes, it is, it's a feature of C# to forbid writing const in the signature of a function
I probably don't understand it well, but this C# feature looks wild!
Probably don't understand it well, but this feature of C# looks wild!
as the saying goes ... whatever you get for free, that's what you use ))))
Is there no way to "trick" the compiler with define or template to get rid of this limitation in MQL?
Is there no way to "trick" the compiler with define or template to get away from this limitation in MQL ?
Asked a question.
The question is, can two-way communication be organised between the services and the advisor via resources?
If so, it is definitely a useful and useful thing!
You are absolutely right. It is possible with the current version, but you have to create some kind of dedicated solution. It would be nice to have a built-in solution for communication between EAs/indicators and services as well as between services. Renat knows this without a doubt.
Can't wait to see Metaquotes solution for these communication problems :-)
You are absolutely right. It is possible with the current version, but you should create some kind of special solution. It would be nice to have a built-in solution for communication between experts/indicators and services as well as between services. Renat knows this without a doubt.
I can't wait to see Metaquotes solution for these communication problems :-)
With global variables of the terminal, you can transfer up to 8 bytes of information in one variable.
To differentiate access from different MQL5 programs, you can use GlobalVariableSetOnCondition