JegForex - Solusi Tepat Untuk Investasi
Home Register About Forex Platforms Education Jeg Blog
» Demo Account
» Real Account
» Open Account

» JegForex Basic
» Psychologys Tading
» Indicator Trading
» MetaTrader Platform

» Learn MQL4
 

Section 1
Introduction: the uses and about MQL4.
Section 2
Simple Example of EA: the Expert Advisor, its example
Section 3
The Syntax and Basics: the variable and comments.
Section 4
Data Type: the type of data on MQL4 with examples.
Section 5
Plans and expressions: the operator and its expression in the MQL4 example.
Section 6
Decision and Looping: the use of branching and looping to set the EA program flow.
Section 7
Order and Technical Analysis: EA discusses how to create order and make use technical indicators.
Section 8
Developing EA: discuss how to prepare EA. It is expected that the reader is able to make a simple EA.
Section 9
Use iCustom: discuss how to prepare the EA based on a custom basis entry indicator.

 
JegForex Registration
JegForex Contact
JegForex Education
 

 Back to Learn MQL4

Section 4 - Data Types

In MQL4 have 7 types of data:

1. Integer (int)
= Integer number not use commas, up from -2 billion +2 billion

code:
int A=1;

2. Boolean (bool)
Boolean values can only be right or wrong (true or false)

code:
bool SpreadProtection=true;

3. Character (int)
Char This content is only 1 letter / symbol only, use the declaration to int, because the stored number is an ascii

code:
int char1='A';

only 1 letter, and followed by quotation marks 1

4. String (string)
String = sentence/words

code:
string commentOrder="Order by EA1";

use the words in quotes ( ")

5. Double (double)
with the exact same integer, only to double this number using commas

code:
double Lot=0.1;

6. Color (color)

Color is a color save information ...
function-function Those parameters have a certain color, to set the arrow color chart its ....
for example OrderSend

code:
color WarnaBuy=Red;
OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,WarnaBuy);

color is most easily written it (Red, Blue, Green, etc.), or use of the RGB integer value to its .. but I like colors are quite common, is not it only charting a course, not the painting. Color options can be set in the colors on the Web - MQL4 Documentation

7. Datetime (datetime)

Datetime to save this date and time information to a variable

Eg
code:
datetime expiredEA=D'31.12.2007 00:00:00'; if (TimeCurrent()>expiredEA) { Print("maap, EA sudah expired"); }

function above, the time now with the date and time expired EA stored in a variable ...
besides, usually datetime is used to set the expire time of the order pending

D'dd format. mm.yy HH: MM: SS '

Hopefully useful to all of us ..
Click the register when you are ready!

Section 5 - Plans and expressions: the operator and its expression in the MQL4 example.

 
 

 

 

 Jadikan homepage Anda | | Risk Disclosure | Contact | Links

Solusi tepat dalam investasi.
© 2010. all rights reserved
 
Sported by Polsend.com