Questions from Beginners MQL5 MT5 MetaTrader 5 - page 611
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 don't know about that, I usually don't close the browser until I get to the "ready to check" stage. Try looking in your tab for "my products", the draft is usually there, if it's not there, you might need to start from the beginning. If the name of the product you wanted to publish isn't taken, you probably haven't saved the draft.
Once upon a time I asked a question about the possibility to save an array of class objects to a file, and I got an affirmative answer from the community. Finally I got a chance to check it all. And yes, indeed THAT-that saves. And then it even reads THAT. Anyway, both FileWriteArray and FileReadArray return correct values by the number of written and read items. However, when trying to access the first element of the array through a class method, the tester generates the invalid pointer access error followed by OnTick critical error and terminates. Note, though, that if you're working not with a written and then read array, but just with something that's created in memory, everything works. What could be the problem? What is the correct way to restore a saved object array?
Greetings all, dear colleagues!
Once upon a time I asked a question about the possibility to save an array of class objects to a file, and I got an affirmative answer from the community. Finally I got a chance to check it all. And yes, indeed THAT-that saves. And then it even reads THAT. Anyway, both FileWriteArray and FileReadArray return correct values by the number of written and read items. However, when trying to access the first element of the array through a class method, the tester generates the invalid pointer access error followed by OnTick critical error and terminates. Note, though, that if you're working not with a written and then read array, but just with something that's created in memory, everything works. What could be the problem? How to correctly restore a saved array of objects?
Hello, I know MT4 pretty well, but MT5 is a newbie. Please advise which command to close the order! I couldn't find any command in the list of operation types here https://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions. The only command I have isCLOSE_BY, I just need to close the order.
in mt5 it's not that simple
to close means to open an opposite trade with the same lot
i.e.TRADE_ACTION_DEAL operation
in mt5 it's not that simple
to close means to open an opposite trade with the same lot
i.e.TRADE_ACTION_DEAL operation
Thanks for the reply, but I do not quite understand it yet. Do I open an opposite position and thenTRADE_ACTION_CLOSE_BY between them?
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 closing a position:
In MT5 there is a 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:
I think I'm starting to get it! ) The position will change with every order execution for that instrument, right. The question now is"The position identifier is a unique number that is assigned to each newly opened position and does not change throughout its life. It corresponds to the ticket of the order with which the position was opened".
And if subsequent orders change the position, does its number remain equal to the first order which created it?1. I think I'm beginning to understand! ) The position will change with every order execution for this symbol, right?
And if subsequent orders change the position, does its number remain equal to the first order which created it?2. Theposition identifier is a unique number, which is assigned to each newly opened position and does not change throughout its lifetime. It corresponds to the ticket of the order with which the position was opened".
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.