Download MetaTrader 5

Change mt4 password

To add comments, please log in or register
richo
191
richo 2012.10.26 17:12 

Hi


Is it possible to change MT4 user password by coding in an EA?

Basically I wanted to force close MT4 if certain percentage of loss for the day occurred.

thanks

Richo

whroeder1
14764
whroeder1 2012.10.26 20:37  

No

Why close the terminal? Terminal auto restart. - MQL4 forum

Either have the EA STOP TRADING,

Permanently
For the day
bool trading.disabled;
void DisableTrading(string why){ 
    trading.disabled=true; Comment(why); } 
int init(){ trading.disabled = false; ..}
int start(){ if (trading.diabled) return(0);
   :
#define HR2400          86400                   // 24 * 3600
datetime TimeOfDay(datetime when){  return( when % HR2400          ); }
datetime DateOfDay(datetime when){  return( when - TimeOfDay(when) ); }
datetime trading.disabled;
void DisableTrading(string why){ 
    trading.disabled=DateOfDay(TimeCurrent)+HR2400; Comment(why); } 
int init(){ trading.disabled = TimeCurrent; ..}
int start(){ if (trading.disabled > TimeCurrent()) return(0);
   :

or have the EA exit

FOF_MT_2015
9
FOF_MT_2015 2016.10.21 15:53  

Hi,

I would like to know as well how the trading password for an account can be changed from within a running EA. The idea is to be able to restrict an external trader (operating through an LPOA) from carrying out any additional transactions once a certain equity loss has been reached in the account.

Many thanks,

Christian

Fernando Carreiro
2284
Fernando Carreiro 2016.10.21 16:01  
As already stated by WHRoeder in the post before yours, you cannot change the passwords programmatically! Such a possibility, would defeat the purpose of their use and the security they offer!
To add comments, please log in or register