Typical mistakes and how to deal with them when dealing with the trading environment - page 5

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 example we are talking about the specific TC situation described. And there the question is left unanswered.
The function returns what is physically in the account. And it lies exactly as much as it would lie in MT4. I.e. everything is normal.
With all due respect, I can't understand your desire to move away from the real problem to a sucked up (and not even formalised in this thread) problem.
Carry on without me.
In MT4 the function will not return "maybe three", it will return exactly two.
You propose to return both physically existing positions - their number - and market orders which are not yet positions. And may never become one.
Absolutely right!
My example is not more hypothetical than yours from the viewpoint of the TS behavior.
With all due respect, I can't understand your desire to move away from the real problem to a sucked up (and not even formalised in this thread) problem.
Carry on without me.
Absolutely right!
My example is not more hypothetical than yours in terms of TC's behaviour.
Andrey. The real problem is that the suggested solution to the problem of opening an extra position may itself, in turn, return false. Is this not a problem? There are two positions. One market order. The function returns three. The order is canceled by the server. That's the error.
I will even show you what such cancelled market orders look like
Only there is no error.
No one seems to want to see a different problem. Everyone has had enough of the other problem. Until you are faced with the problems it created.
That's the thing, when there are two positions and one opening market order, there are three positions. If in a moment the broker cancels the market order, the positions become two. Where is the error?
I cited an example for a reason, to understand the logic.
Forum on trading, automated trading systems and trading strategies testing
Typical mistakes and how to fix them when working with a trading environment
fxsaber, 2018.02.24 14:46
Let's move away from MT5 towards MT4. An advisor is trading. Suddenly the broker, through a technical error (not you), places a position on your account that successfully passes the EA's own-others filter - magik, symbol, etc. Seconds later, the broker corrects his mistake - deletes (doesn't even close) his position from your account.
Will your TS break down?
No one seems to want to see a different problem. Everyone has had enough of the other problem.
I will even show you what such cancelled market orders look like
Only there is no error.
The point is that when there are two positions and one opening market order, there are three positions. If in a moment the broker cancels the market order, there are two positions. Where is the error?
I gave an example for a reason, so that the logic is clear.