Questions from Beginners MQL5 MT5 MetaTrader 5 - page 958
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
I'm really confused about pending orders and positions when accessing the deal history.
If a pending order triggered and moved to a position and was successfully closed (deal), then how is it stored in the history cache as an order or as a position?
How do I address it as a position or as an order through the status?
I'm really confused about pending orders and positions when accessing the deal history.
If a pending order triggered and moved to a position and was successfully closed (deal), then how is it stored in the history cache as an order or as a position?
How do I address it as a position or as an order through the status?
Studying this section of the documentation should help.
First an order, it goes into a trade, then a position. Then if it is a netting account more orders and deals and at the end an order in the opposite direction with a lot equal to the existing position, from it a deal and no position. It is closed and there is no position in the history, there are only orders and deals that have created, changed and closed this position. But all of them are connected to the position ID.4758
Failed to calculate profit or margin
How can this be fixed?
Studying this section of documentation should help.
First an order, it goes into a trade, then a position. Next, if it is a netting account more orders and deals and at the end an order in the opposite direction with a lot equal to the existing position, from it a deal and no position. It is closed and it is not in the history, there are only orders and deals that have created, changed and closed this position. But all of them are connected to the position ID.Alexey. I have read the primer, but you have explained everything in your own words in an easier way than it was written there... Everything is clear and understandable. Thank you)
Alexey. I have read the primer, but you have explained everything in your own words in an easier way than it was written there... Everything is clear and understandable. Thank you)
But I said "study the section", not read it. It's all there, but scattered with descriptions of various functions of this section, it's just documentation, not a beginner's book. There are other articles as well. Surely there must be one of them that talks about it.
Please.
But I said "study the section", not read it. It's all there, but scattered with descriptions of the various functions of this section, it's just documentation, not a primer for beginners. There are other articles as well. Surely there must be one of them that talks about it.
You're right, I should be studying, not just reading, what aroused interest at the moment. But I'm following my emotions and my desire to get a quick and practical result, implemented in the form of a working algorithm.
And I'm trying to get from mql5 only what I need for solving this narrow task... As a result I have a lot of gaps in education)
I already seem to be able to recognize letters, but they don't want to form words and sentences).
It is also difficult because there is no exact textbook with examples and exercises, and the Help is designed for those, who already have some programming experience and in fact explains only their own syntax.
Of course there is a lot of information on the forum, but everything is very scattered and sometimes not reliable due to new changes in mql5.
I probably should have started my acquaintance with mql4... There are obviously more tutorials there, and then, having received the basic experience, an idea, start using mql5, studying its differences.
I'm partially doing so, looking for examples in mql4 and trying to implement them in mql5 by analogy. But sometimes because of the cardinal differences of some functions and principles it makes me even more confused)))).
Apparently all the self-taught go through this).
What you said above, I will certainly take into account, at least I will try).
After updating the terminal, the Expert Advisor stopped building.
Error
What could be the problem?
This is the function the compiler is swearing at
After updating the terminal, the Expert Advisor stopped building.
Error
What could be the problem?
This is the function the compiler is swearing at
The LotsOrRisk() function is declared as a bool. It means that it can only return true OR false.
Apparently it's more my hardware's fault... and my system.
Upgraded the system to vin10, did a disk check with bit sector localisation. Well, I'll have to upgrade to SSD I guess.
The compile also took over 10 minutes. It's not normal for it to take so long to compile...
Is it possible for the indicator to display the input parameters on the chart? Maybe there is a ready example?