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 5 - Plans and Expression

1. Arithmetic operator

code:
A = B + C / / a = b plus c
A = B-C / / a = b c reduced
A = B * C / / a = b c multiplied
A = B / c / / a = b divided by c

A = B% C / / a = b for the remaining c - 10% 3 = 1; 8% 3 = 2

code:
A + +; / / same as A plus 1

/ / example:
A = 1; / / A is the same as the 1
A + +;
Print (A); / / A value at this time 2 (1 +1)
A + +;
Print (A); / / A value at this time 3 (because of added 1 more)

code:
B -; / / same as above, only 1 was reduced
B = 1;
B -;
Print (B); / / current value is 0 B

2. Assignment operator

the general use only =
I have many, there is + =, -=,% = etc., but rarely use & quite hard to understand .. Anything I so in the future course

code:
a = b * 5; / / enter the value multiplied b 5 to a
a + = 5; / / A the same as a +5
a-= 5; / / A is the same as the a-4

3. Relational operator (operator benchmark)

code:
==: Equal
! =: Not equal
<: Less than
>: Greater than
<=: Less than or equal to
> =: Greater than or equal to

example the implementation of

code:
if (a == b) () / / if a is the same as the b
if (a> b) () / / if a is greater than b
if (a! = b) () / / if not equal to a b

4. Logical operators

there are only 3 that are important

& &: And
| |: Or
! : Not

example implementation:

code:
if (a == b & & c <d) () / / if a is the same as the b and c is smaller than d
if (a == b | | c> = d) () / / if a b is the same as the one (not as a means of b) or c greater than or equal to d

=========
There are several other operators, such as bitwise operators, but not too used to the simple EA, so I just Anything later.

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

Section 6 - Decision and Looping: the use of branching and looping to set the EA program flow.

 
 

 

 

 Jadikan homepage Anda | | Risk Disclosure | Contact | Links

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