0% found this document useful (0 votes)
6 views1 page

MQL5 Language Basics Bool Types

The document discusses the basics of BOOL types in MQL5 programming language, defining TRUE as 1 or any non-zero number and FALSE as 0. It includes a sample code demonstrating the initialization of boolean variables and conditional statements to check their truthiness. The code also illustrates how integer and double types are evaluated in conditional statements.

Uploaded by

Abu Rashel Moni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

MQL5 Language Basics Bool Types

The document discusses the basics of BOOL types in MQL5 programming language, defining TRUE as 1 or any non-zero number and FALSE as 0. It includes a sample code demonstrating the initialization of boolean variables and conditional statements to check their truthiness. The code also illustrates how integer and double types are evaluated in conditional statements.

Uploaded by

Abu Rashel Moni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MQL5 Language Basics: BOOL TYPES

/*

TRUE = 1 OR ANY OTHER NO. OTHER THAN 0

FALSE = 0

*/

int OnInit()

bool a = true;

bool b = false;

bool c = 0;

int i = 0;

double d = 9;

if (i) Print("i = ", i," and is set to true");

else Print("i = ", i," and is set to false");

if (d) Print("d = ", d," and is set to true");

else Print("d = ", d," and is set to false");

return(INIT_SUCCEEDED);

You might also like