Hi. Before anything, english is not my native speaking languaje, so i´m sorry for my grammar mistakes. I´m trying to make a script for MT5 that do the following:
-Launch when the terminal.exe start.
-Wait until login to broker server.
-Get account balance at the begining of the current day (00.00) or at the first action of the day(buy, sell, etc) from the account history.
- Store that value as Variable 1
-Store a second variable (2), with a customizable value, 0.95
-Get account current equity.
-Do (currentEquity)/Variable1 . If that is equal or less than variable2, close terminal.exe; if not, do nothing and continue.
-wait x seconds
-Go to start
Possible?
Thanks in advance.
automate some task with windows os, and used and learned macro scheduler, a macro maker program.
Or maybe here:
https://www.mql5.com/en/docs/constants/environment_state/accountinformation#enum_account_info_double
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi. Before anything, english is not my native speaking languaje, so i´m sorry for my grammar mistakes. I´m trying to make a script for MT5 that do the following:
-Launch when the terminal.exe start.
-Wait until login to broker server.
-Get account balance at the begining of the current day (00.00) or at the first action of the day(buy, sell, etc) from the account history.
- Store that value as Variable 1
-Store a second variable (2), with a customizable value, 0.95
-Get account current equity.
-Do (currentEquity)/Variable1 . If that is equal or less than variable2, close terminal.exe; if not, do nothing and continue.
-wait x seconds
-Go to start
Possible?
Thanks in advance.