Okay guys/gals I have a question for you. I use MT4 for my charting and to run my expert advisors. This is a borderline EA type question but I’m going to post it here…
In MT4 I have different profiles set up for example for different pairs I like to have 4 charts open per pair so I will set up a profile for each pair I trade this way I can click the mouse and voila I get all 4 charts at once for whatever pair.
I also have a profile set up for my EA’s and in MT4 there is options related to experts. For example allow live trading, allow dll imports ets… This is in tools-options-expert advisors.
In this tab it offers me a chance to automatically turn experts off when I change users or change profiles. naturally I un-clicked this box because I want the EA’s to run all the time
however (here’s the question) when I look under the expert tab in the trade terminal, which is alog of all the expert advisor activity I notice that when I change profiles it says for example FMT initiated and when I change again it says FMT removed???
Does this mean that even though I have elected to allow live trading when I change profiles that MT4 turns off my EA’s anyway? Does anyone have experience with this?
the smiley stays and the expert advisor button stays green but it gets recorded in the expert advisor log as being disabled and then enabled when I switch profiles back.
Im going to have to go to metaquotes for an answer I guess.
If it does that it is being restarted, if you have any doubt about that put an alert in the init() function, something like
Alert(“EA Was Restarted”);
The init() function is only run if the EA is restarted so if you see that alert pop up when changing profiles you will know for sure it definately was restarted.
int init()
{
//----
Alert("EA Was Restarted");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Alert("EA Was Shut Down");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+