MQL4 Data Types
Overview
MQL4 programs operate on data of various types. Data types influence processing speed and internal representation. Integers are processed fastest, followed by floating-point numbers (using a co-processor), and then strings (due to dynamic memory allocation). Price data is of double precision.
Basic Data Types
char, short, int, long, uchar, ushort, uint, ulong.bool.ushort (for symbol constants).string.double, float.color (represented internally as an integer).datetime (represented internally as an integer).enum.Complex Data Types
struct.class.interface.Type Characteristics
double is slower due to co-processor, and string is slowest due to memory management.color and datetime types are primarily for visualization and parameter input in Expert Advisors or custom indicators. They are stored as integers.Related Concepts
/basis/types/casting./basis/types/integer./basis/types/stringconst./basis/types/double./basis/types/classes./basis/types/void./basis/types/typedef./basis/types/object_pointers./basis/types/this.
Previous
arrow_back
Syntax