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
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
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!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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