Errors, bugs, questions - page 1724
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
In the process a couple of questions arose:
1. Why is it impossible to write operator() in Comp (it is prohibited for some reason)?
2. Why can't we pass prvalue to function which accepts constant reference?
ZS: and also very annoying this warning: "struct has no members, size assigned to 1 byte "
Everything is fine there, order placement should be controlled through OnTradeTransaction, by the way, if you connect to the exchange directly through Plaza2, the situation is the same - you need to control the arrival of messages about order placement. In MT4, this function is synchronous, but the same option is available in MT5, only in this case, the logic will stop until the function receives no response.
If you need, I can send you the control class, but it is written for market placing, but soon I will finalize it for limiters.
Very much I ask you to post something to the kodobase! For educational purposes.
Can't for the reason you yourself pointed out https://www.mql5.com/ru/forum/1111/page1743#comment_2877482. Recently I could not localize the error, spent a lot of time to form the source code into servicedesk - in the end nothing came out because of many cross-references (one pulls the other in geometric progression) - I sent .ex5
For educational purposes I can suggest the task: without introducing additional variables simplify h() so that f() is called in any case once
Compilation error
(*) In general, in pattern (1) both A->(2) and const A->(3) can be substituted instead of T.
Why is that? A pattern with const cannot accept non-const - it violates the contract.
For educational purposes, I can suggest the following task: without introducing additional variables, simplify h() so that f() is called once in any case
Why is that? A template with const cannot accept non-const - it violates the contract.
Has anyone experienced a similar problem? Is it a "bug" in the terminal or mine?
MT5-OrderSend is NOT fully synchronised - there is no synchronisation with the trading environment. This means that the history readings do not correspond to the real situation.
No timeout is out of the question. There is no reliable solution to the problem, because you have to deal with synchronization issues at the terminal level, not at the server level.
In fact, MT5 users are facing what MT4 bridge developers are facing.
If an OrderSend is sent, you have to REMEMBER (this is where the potential vulnerability is) that it is done. Then ignore the current history (trading environment) until the corresponding message comes in OnTrade. Once it arrives, REMEMBER to FORGET.
When there is no REMEMBER, you can trust the history as in MT4.
MT4-OrderSend is FULLY synchronised.I understand if you mess with OrderSendAsync asynchronously, you can handle both OnTrade and OnTradeTransaction. With OrderSend I want to have simple behavior, like in MT4. Once it is called, we obtain in the output already modified open positions and history.
There is a subtle point. If the current state is stored in a global variable and the expectation of state changes takes a relatively long time, and the trader manages to change the EA parameters, the global variables will be reset and the state will be discarded.