Questions from Beginners MQL5 MT5 MetaTrader 5 - page 612

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
1. Yes, that's right. Execution of an order generates a transaction. A transaction can:
Increase volume, run the script again - compare the line again
As you can see, the position property (POSITION_IDENTIFIER) does not change if the position is not reversed.
In MT5 there is the concept of a POSITION. You can close a position. If you want to close a position completely, use the standard library. For a netting account an example of how to close a position:
There is a string txt (downloaded from a news site)
string txt = "ИÐдеÑк ожиÐа´Ð½Ð¸Ð¹ в ÑÑ "еер уÑÐ "уг (авг)</a>\n";
original encoding UTF-8. is displayed as: windows 1252
needs to be converted by mql4 means into the form - Service Expectation Index (Aug)</a>
Thanks in advance!
Hello!
There is a piece of code
After it is executedPositionsTotal()
it shows 22 by the number of open orders (market orders). Indeed, 22 orders are open, but they are all for the same instrument. I think there should be only one position. What is wrong? Please advise!
Hello!
There is a piece of code
After it is executedPositionsTotal()
it shows 22 by the number of open orders (market orders). Indeed, 22 orders are open, but they are all for the same instrument. I think there should be only one position. What is wrong? Please advise!
A position and an order are completely different things! A position is:"The result of thetrades is the opening of a position".
So if you have Buy or Sell orders, they are not orders, they were orders before the position was opened.
Also, the concept of "market order" does not exist, the order can be pending - Limit and Stop, as well as Stop Loss and Take Profit are also orders (order of the DC to close). Buy and Sell are positions, not orders, they are your positions in the market!
A position and an order are completely different things! A position is:"The result of atrade is the opening of a position".
So if you have Buy or Sell orders, they are not orders, they were orders before the position was opened.
Also, the concept of "market order" does not exist, the order can be pending - Limit and Stop, as well as Stop Loss and Take Profit are also orders (order of the DC to close). Buy and Sell are positions, not orders, they are your positions in the market!
Thank you for responding, but what you have written is clear to me as it is. I wrote market orders in the sense that they are already in the market, not pending. The question was why there are 22 positions, not just one. I think you didn't look at the code and immediately responded. Sorry...
Hello.
Please tell me how to get the text located on the first bar into a variable.
I want to get int TXT = 191;
ObjectGetString()
OBJPROP_TEXT
Description of the object (text contained in the object)
string
ObjectGetString()
OBJPROP_TEXT
Object description (text contained in object)
string
Thank you, it's not quite clear how to implement this in this case.
What's wrong with it?