Features of the mql5 language, subtleties and tricks - page 180
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
WithREASON_ACCOUNT(even if the account does not change, just re-login), the Expert Advisor is completely unloaded and a new copy is loaded.
For this reason, ExpertRemove in OnDeinit has no effect on the new copy as it concerns the unloaded copy.
If the symbol is missing, the new copy is loaded without any execution.
And the problem was to unload a new copy which is hanging, but not running.
The hanging copy means that if there is a switch to another account where there is a symbol, the EA will start.
Good explanation, thanks
I checked ChartID() for the black screen of the missing symbol... and it is - the ID is always the same, however this is what started the dispute with the admin, the events of OnInit()... and check flags _StopFlag , _UninitReason
but the chart is not bound to the symbol.... Fine, whatever.
Thanks again.
There must be complete control.
If the entry points do not work, there is no risk of running an EA.
If they work, you can check in them to see if the account has changed.
I don't see a loss of control.
Hanging a copy means that if there is a switch to another account where there is a symbol, the EA will start.
Firstly: the EA will not start because the Algotrading button is already pressed.
Secondly, the solution in this case is absolutely easy.
The animation does not work for some reason. You have to click on it.
If the entry points do not work, there is no risk of running an EA.
If they work, you can check in them to see if the account has changed.
I don't see a loss of control.
You're trying to convince me that what I needed wasn't really needed. This is not the case, unfortunately.
Firstly: The EA will not start because the Algotrading button is already pressed.
This behaviour depends on the terminal settings. Moreover, EAs do more than just trade.
Second: In this case the solution is absolutely simple.
The animation does not work for some reason. You need to click on it.
I have ten terminals. In turmoil on one of them I switched to another account. Time passes, I look at the Terminal and see that I need another account - I switch to the old one. And completely without expecting that the EA is hanging, I see that the EA is running.
And this is just one of the scenarios.
This is not a freelance client's wish, but what I needed.
You are trying to convince me that what I needed, I didn't really need. That is not the case, unfortunately.
I'm trying to imagine a situation where it might come in handy. I can't.
I have ten Terminals. In the turmoil on one, I switch to another account. Time passes, I look at the Terminal and see that I need another account - I switch to the old one. And completely without expecting that the EA is hanging, I see that the EA is running.
And this is just one of the scenarios.
Question number 1. Why would I want to switch to another account in the live terminal?
Question number 1. Why should I re-login to another account in the battle terminal?
There is a universal terminal for all accounts. It has all the tools at your fingertips + a quick ability to write/correct something in ME.
In this terminal I switch between accounts every day for different actions. E.g. for screeners, analysis oftrade order execution quality, etc.
If I run something and forget about it, when I switch to another account it is logical to unload it.
Alexey Navoykov:
Не знаю, у кого как, а у меня любой торговый советник всегда имеет входной параметр AccountID. В котором явно прописывешь номер счёта, на котором он может торговать.
It is terribly inconvenient to enter the account number every time. For example, I have a ten-digit account.
I just can't imagine working on a real account any other way. Especially if there's a bunch of terminals and "turmoil".
Manually launching your EA in the beginning is a deliberate matter. Moreover, immediately after startup my browser shows an HTML report of backtest of the EA up to the current tick. Therefore, it is very difficult to make a mistake.
But when the EA is already hanging, its unauthorized launching is undesirable. The protection described here is very good. And there is no need to enter anything additionally.
There is a universal terminal for all accounts. It has all the tools at your fingertips + a quick ability to write/correct something in ME.
In this terminal I switch between accounts every day for different actions. E.g. for screeners, analysis of trade order execution quality, etc.
If I run something and forget about it, when I switch to another account it is logical to unload it.
I usually have 1-2 charts on this terminal, it's hard to get confused. But the sense is clear.