Professional Documents
Culture Documents
01 Lesson1 - Welcome To The MQL4 Course PDF
01 Lesson1 - Welcome To The MQL4 Course PDF
By Coders’ g u ru
w w w . f orex -t sd. c om
-1-
WELCOME
--------------------
1- E x p ert Ad v i sors.
2- C ustom I n d i ca tors.
3- S cri p ts.
1- T h e h a r d w a y
The ha rd w a y i s usi n g y our f a v ori te tex t ed i tor a n d the comma n d p romp t to comp i le y our
p rog ra m.
N otep a d i s n ot b a d choi ce, b ut d o n ot f org et tw o thi n g s:
1- To sa v e the f i le y ou ha v e crea ted i n p la i n tex t f orma t.
2- To sa v e the f i le a s .mp 4 (tha t’ s to b e ea sy to reop en i t w i th Meta ed i tor) , b ut y ou
ca n sa v e i t a s a n y ex ten si on y ou p ref er.
Af ter sa v i n g y our p rog ra m there i s a n ex tra step to ma k e y our cod e comes out to the li g ht.
It’s the Compiling step.
C omp i li n g mea n s to con v ert the huma n rea d a b le scri p t tha t y ou ha v e j ust w rote to the
ma chi n e la n g ua g e tha t y our comp uter un d ersta n d s.
Meta Tra d er ha s b een shi p p ed w i th i ts ow n comp i ler (the p rog ra m w hi ch w i ll con v ert
y our scri p t to the ma chi n e la n g ua g e) ca lled Me t a La n g .e x e .
E x a mp le
1- F i n d y our meta la n g .ex e p a th, i t w i ll b e the sa me p a th of Meta Tra d er (here my
p a th i s D :\P rog ra m F i les\Meta Tra d er 4)
2- C rea te a b a tch f i le a n d n a me i t comp i le.b a t (or a n y n a me y ou p ref er) .
3- W ri te these li n es i n to the b a t f i le then sa v e i t.
cd D : \P r ogr a m F iles\M eta T r a d er 4
meta la ng -q " D : \P r ogr a m F iles\M eta T r a d er 4 \my _ f ir st_ mq l4 _ scr ipt. mq 4 "
(D on ’ t f org et to cha n g e the p a th to y ou Meta Tra d er i n sta lled p a th)
4- R un the b a tch f i le a n d i f y ou a re luck y p erson li k e me y ou w i ll g et a screen li k e
thi s.
F i g u r e 1 Metalang compiler
2-T h e e a s y w a y
Meta tra d er ha s b een shi p p ed w i th a g ood I D E (i n teg ra ted d ev elop men t ed i tor) ca lled
Meta E d i tor w hi ch ha s these f ea tures:
1- A tex t ed i tor ha s the f ea ture of hi g hli g hti n g d i f f eren t con structi on s of MQL4
la n g ua g e w hi le y ou a re w ri ti n g / rea d i n g cod e.
S ee y ou
C o d e r s’ G u r u
19 -10 -20 0 5