Features of the mql5 language, subtleties and tricks - page 173
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
Updated above.
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5, tips and tricks
fxsaber, 2020.04.09 13:13
It looks like you have not encountered it at all. Have a look at the Documentation. There are two volumes per order.
These are live limiters. The first number is the original volume, the second is the poured volume. As soon as they become equal or are deleted, it goes into history.
Isn't that one order executed in two parts? It seems strange that the unexecuted volumes are the same.
Isn't that one order executed in two parts? It seems strange that the unexecuted volumes are the same.
Coincidence. They even have different mags.
There can be no order in order mode when it is alive. When dead - there will be a time of first execution, as originally said.
Found in history.
When you collapse via CloseBy, it seems to lose the majicies. Need to check it out.
This seems to be the reason why the first code below will not work.
Forum on trading, automated trading systems and testing trading strategies
History Profit in MQL5 ?
fxsaber, 2017.08.26 19:16
Counting the profit in magic seems to be a problem.
The arrows to open/close positions, which MT5 automatically places in real time, are based on TradeTransaction-events.
Just now I saw that these events (opening and closing about a dozen positions) didn't reach the terminal because of a momentary connection failure - it was so coincidental, I was sitting at my PC and looked at them by eye. As a result there are no corresponding arrows.
And, as has sometimes been said here, you can't rely on OnTradeTransaction in combat EAs. Too bad there is no reliable public mechanism for dealing with OrderSendAsync.
Too bad there is no reliable public mechanism for dealing with OrderSendAsync.
can the services access the trades? - if so, then it is possible to monitor every 10 ms and send the event to the chart
i looked at the help, i thought maybe i got the services added, but i think it was like this last year:
-It is a programme which, in contrast to indicators, Expert Advisors and scripts, does not require binding to a chart. Similar to scripts, services do not handle any events except for the launching event. In order to start a service, its code must contain the OnStart handler function. Services do not accept any other events except Start, but they can send custom events to charts themselves using EventChartCustom
UPD: I wrote up a service script.
I opened several orders and closed them manually.
can the services access the trades? - if so, it is possible to monitor every 10ms and send an event to the chart
This is no different than the same overrun in sovtenik. Only it's not enough to compare counts, the internals may change.
It's no different from the same overkill in Owletnik. Only it's not enough to compare the quantity, the internals can change.
Services like Alerters are very good. You don't need charts, they are automatically started with Terminal. You just have to work out the situations of switching between accounts.
The service can also be a combat advisor. Without the GUI it's just not very convenient.It's no different from the same overkill in Owletnik. Only it's not enough to compare the quantity, the internals can change.
is different.
there are so-called control and management tasks
EA - management, service - control
control must not be superfluous - you will take all resources of the system and get an unstable system instead of control
you have to define the criticality of the events, imho, closing and opening of orders - these are critical events that need control, while changing TP and SL could be done as before (a few failed attempts - let it go, on the next tick we will try again)
and the way you suggest - controlling everything is possible - you can repeat the state of orders in SQLite, then there will be a synchronization problem of the database with the service and EA.... all this is unnecessary
I think the scheme should be simpler - it should look as follows: get theOnTradeTransaction event from the terminal in EA and generate the OnChartEvent event from the service for additional control in EA