Hi,
I have a question that I hope you can help me with, it is about MQL’s way of passing objects by reference.
If I have a structure that contains 11 variables for example, comprising of 6 string variables, 5 double variables and 1 datetime variable. Is there any benefit in MQL from passing the structure by reference to a function as opposed to passing the 11 variables independently?
I believe that a reference does not work the same in MQL as it does in C++ and is not actually pointing to a memory location, but Is passing the MQL structure more of a memory hog way of doing it than passing the separate variables?
I find structures a convenient way of grouping like variables together and make the code more descriptive, but I don’t want to keep doing this if it is bogging the program down
Thanks for your help,
John