Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1314
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
to see what is there
when restarting the terminal, the consoleAccountNumber() receives 0, but the terminal itself loads under the account and works
when restarting the terminal, the consoleAccountNumber() receives 0, but the terminal itself loads under the account and works
Bolly, you're writing in the wrong place.
When restarting the terminal, the consoleAccountNumber() receives 0, but the terminal itself is loaded under the account and works
Account data, balance, etc. are not able to get actual information from the server -init() works before the terminal receives values from the server.
Account data, balance, etc. do not have time to get up-to-date information from the server -init() works before the terminal receives values from the server.
Good! Fixed! It works! And here is another important question:
There is a check for the account on the indicator! It stands and works in the terminal, but at a certain moment the user manually changes the account, according to the rules of check the indicator should argue that the account is wrong, but it does nothing and can continue working until you change its settings, even after the restart of the terminal! How can I fight this?
All right! Fixed it! It's working! And here's another burning question:
There is an account check on the indicator! It stands and works in the terminal, but at a certain moment the user manually changes the account, according to the rules of check the indicator should argue that the account is wrong, but it does nothing and can continue working until you change its settings, even after the restart of the terminal! How do I fight this?
Something is not written correctly
P.S. Try unprinting Print( AccountNumber() ); what will it show when the account changes? But not in the iniit understandableHi there!
In the book on MT4 in one of the tasks is written: that to determine whether there is a new bar, compare the opening price of zero bar with a bar number 1 (ie, if the opening price has changed and a new bar appeared) used this method, but ran into a skip messages in the tester, started to understand, and remembered that - several bars may have the same opening price and therefore this method can lead not only to errors but losses respectively. Be careful and use not the opening price but time or other methods!!!
Hi there!
In the book on MT4 in one of the tasks is written: that to determine whether there is a new bar, compare the opening price of zero bar with bar number 1 (ie, if the opening price has changed and a new bar appeared) used this method, but ran into a skip messages in the tester, started to understand, and remembered that - several bars can have the same opening price and therefore this method can lead not only to errors but losses respectively. Be careful and use not the opening price but time or other ways!!!
iTime
Something is not written correctly.
P.S. Try unprinting Print( AccountNumber() ); what will it show when the account changes? But not in the init understandableshows the new (changed) account, but nothing else happens
All right! Fixed it! It's working! And here's another burning question:
There is an account check on the indicator! It stands and works in the terminal, but at a certain moment the user manually changes the account, according to the rules of check the indicator should argue that the account is wrong, but it does nothing and can continue working until you change its settings, even after the restart of the terminal! How do I fight this?
i have this problem in MT4, i don't know if when oninit triggers after account switching the account number has not had time to update in the environment or some other bug, i decided to use timer