In this second tutorial I will show you what variables look like in MT4. We will understand the concept of a variable being a box, where data is kept. Different types of boxes (variables) have the capacity to store different data. This notion is also discussed in the tutorial. We will look at the following types of variables:
- int
- double
- string
- bool
- color
- datetime
Get the full course here: http://45.55.161.186/learn-mql4
Code For This Tutorial
Tutorial2.mq4:
//+------------------------------------------------------------------+
//|                                                    Tutorial2.mq4 |
//|                                        Copyright 2014, ForexBoat |
//|                                         http://45.55.161.186 |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, ForexBoat"
#property link      "http://45.55.161.186"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   int      myInteger1;
   double   myDouble1;
   string   myString1;
   bool     myBoolean1;
//   color    myColor1;
//   datetime myDatetime1;
   myInteger1  = 5;
   myDouble1   = 10.56;
   myString1   = "My name is Kirill";
   myBoolean1  = True;
   Alert(myInteger1);
   Alert(myDouble1);
   Alert(myString1);
   Alert(myBoolean1);
//   Alert("Hello World!");
  }
 
START LEARNING FOREX TODAY!
share This:
 
							
											
Leave a Reply