Amps

Friday, December 11, 2015

Forex MQL4 EA Properties Coding Learn Free 1

MQL4 EA Properties Coding

Learning from MetaQuotes Moving Average EA Example

Access MetaQuotes Language Editor

Open Data Folder 



Copy File Moving Average EA and Rename to New one



Check Properties and Activate Auto Trading





Check The original code Moving Average EA

Input variable MQL 4
Input variable with the input modifier can't be changed inside mql4-programs
input variables can be changed only by a user from the program properties window

Example in original code of moving average ea

input double Lots          =0.1;
input double MaximumRisk   =0.02;
input double DecreaseFactor=3;
input int    MovingPeriod  =12;
input int    MovingShift   =6;



Change The Variable Type from Original EA code

External variable or Extern Variable MQL4
Extern ones also determine the input parameters of an mql4 EA
They are available from the Properties window
Extern variables can be modified in the Properties window and MQL4 Program

so, we would add External variable in the properties part of EA and change input variable to extern variable code as below



No comments:

Post a Comment