double or int affects running memory size?
-
as i am aware that using double will increase the memory used and using int will take less memory to run. Is this same here? I notice some value can be int (switch type on/off) to reduce overall running memory load?
-
it depends on a calculation complexity, this is particularly relevant to huge arrays
in most user cases you can use double for all numbers, everywhere (including switches) -
ok noted!
-
I don't think that the type of one variable can change anything. After all, the EA that is generated contains many many variables with different types. It's true that the generated EA contains 100s and 1000s rows of code, while you could manually code the same strategy with so much less amount of code.
Not only that, but I know that sometimes the MQL code itself is slow for reasons that I don't know. I noticed many times before that the amount of code in a function can make it slow, even if 99% of that code never runs. I guess that when the code is compiled, it is not optimized very good and it's like the code in a function is parsed every time the function runs. I don't know if this is true, but it feels this way.
So again, the type of 2-3 variables will not make a change. And todays computers have so much RAM. Even with the 1000s rows of code that fxDreema produces, I think that there are not RAM problems. I personally have 32GB of RAM, only because of the amount of browsers that I use. MetaTrader is nothing compared to Chrome or Firefox in my opinion
