I try to optimize my indicators a little bit by implementing new MQL4 code. I have some general questions about data types. When I need a high or low of a bar, I used the data type double. But now I see that float uses only 4 bytes instead of 8 bytes used by double. When it comes to prices, can I just replace double with float? And what happens when I need to convert it into a string? Can I still use DoubleToStr, even when I use float?
Ok, then I will forget about optimizing the code. My idea was to get more familiar with the new MQL4 and therefore I wanted my old indicators to be adapted to new MQL4. My girl-friend is learning Java at the university right now and we talked about different data types and how to cast them. That was the reason why I generally thought about optimizing my code. I didn't know that Float has ~7 digits of accuracy. So you are absolutely right not to use it.
To add comments, please log in or register