Asynchronous and multi-threaded programming in MQL - page 29
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
Will communication via resources with copies on regular charts (not OBJ_CHART) work? Or is there some kind of limitation there?
Not sure. If you do such an experiment, let me know the results here.
Do I understand correctly that with this implementation the OnTrade approach is out of the question? You should wait for the result of trade orders in a slave?
Forum on Trading, Automated Trading Systems and Strategy Tests
FAQ from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.07.21 21:11
No. Sleep and While are categorically forbidden.
Do I understand correctly that with this implementation the OnTrade approach is out of the question? And it is necessary to wait for the result of trade orders in the slave?
I don't use OnTrade (I write cross-platform code and MT4 doesn't have it). But I'm not waiting much either (I don't use sleep and while). I have enough of what OrderSend() returns
Will communication via resources with copies on regular charts (not OBJ_CHART) work? Or are there any restrictions there?
Each EA agent-copy only needs to know its own number to create a unique resource name.
What OrderSend() returns is enough for me
Result.deal = 0 - enough? And the quirks with unsynchronised trading history right after OrderSend in MT5.
OnTrade seems to work in 4.
Result.deal = 0 - is that enough?
I have not yet had (result.order ==0 && result.deal==0)
https://docs.mql4.com/ru/runtime/runningNot aware of it. If you do such an experiment, let me know the results here.
I will.
In general, this is a strange situation. When reading data via resources, you need to specify the address of the program in which the resource is located. But since there will be copies of the same EA running, they have the same address. How will reading/writing of data be performed in this case? Curious...
Each EA agent copy only needs to know its own number to create a unique resource name.
I haven't yet had (result.order ==0 && result.deal==0)
It's about a five.
It's about a five.
That's what I'm talking about.
I gave the link to four as an answer to the comment that OnTrade works in four.