MT4 EA build procedure 1 MT4 EA Structure
MQL4 Property structure
//+------------------------------------------------------------------+
//| test_bistechn_ea.mq4 |
//| Copyright 2015, BIS and Technology |
//| www.bistechn.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, BIS and Technology"
#property link "www.bistechn.com"
#property version "1.00"
#property strict
This part for declare the property owner of this EA or MQL4 code after Meta Editor complied this MT4 EA property would show in Metatrader program (MT4) part of Expert Advisors during we point this mouse to this EA.
Also this part used for declare public variable. (public variable would able used in any function in MT4 EA)
MT4 EA properties for setting basic parameter would declared in this part
MQL4 Initialization function
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
//---
return(INIT_SUCCEEDED);
}
The Initialization function part used for initialize EA instance Change the Time Frame Trading and etc.
MQL4 Expert deinitialization function
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
This part used for clean all draw line, arrow, which build by EA after not using
MQL4 Expert Start function
//+------------------------------------------------------------------+
//| Expert Start function |
//+------------------------------------------------------------------+
int start()
{
//---
}return (result);
//+------------------------------------------------------------------+
The MQL4 Expert Start Function used for create function what we want this EA working or trade instance open buy or sell and all of activities we would like to do