Questions from Beginners MQL5 MT5 MetaTrader 5 - page 816
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
Forum on trading, automated trading systems and trading strategy testing
New version of MetaTrader 5 build 1730: Projects in MetaEditor and synthetic tools
Renat Fatkhullin, 2017.12.28 08:59
In the 1730 build we found and fixed this error(now resetting the cache on search failure), which resulted in your error
Only information on 1 (selected ) position is available at any one time :
Are you stating a fact or a reference ? I couldn't find anything like that anywhere with a search.
Are you stating a fact or are you asking for a certificate? I couldn't find anything like that anywhere through a search.
In order to get any property of the position, it is necessary to select the required position beforehand.
I understand that we have to select a position and an order before getting information about them. I don't understand what does the CPositionInfo class have to do with it? If we have a class, we can create a lot of objects of that class. And, consequently, each of these objects can be set up for its own position. This is nonsense, so you can create at least a million CPositionInfo objects, but they all will work only with the position that was last selected using the Select() method.
I understand that you have to select a position and an order before getting information about them. I don't understand what CPositionInfo class has to do with it. If we have a class, we can create a lot of objects of that class. And, consequently, each of these objects can be set up for its own position. This is nonsense, you can create at least a million CPositionInfo objects, but all they will work only with the position that was last selected using the Select() method.
Let's continue here.
The PositionSelect() function copies the position data to the programming environment and subsequent calls toPositionGetDouble(),PositionGetInteger() andPositionGetString()return the previously copied data
I understand all this as it is well explained in the help. I don't understand what this has to do with the CPositionInfo class?
It has a Volume() function . There are requirements before calling this function(select a position before using it). I am fulfilling these requirements. I don't see why it returns absolutely wrong volume. Well, is it so, hard to remember at the time of the last call (for this class object) Select() symbol, which I am interested in, and is already at the time of Volume() call to find the position that corresponds to this symbol and return the volume corresponding to this position?
It turns out that there is no sense in the CPositionInfo class, because normally you can work with only one object of this class.
Let's continue here.
I understand all this as it is well explained in the help. I don't understand what this has to do with the CPositionInfo class.
It has a function Volume() . There are requirements before calling this function(select the position before using it). I am fulfilling these requirements. I don't see why it returns the wrong volume. Well really, is it so, difficult to memorize at the time of the last call (for this class object) Select() symbol, which I am interested in, and is already at the time of Volume() call to find the position that corresponds to this symbol and return the volume corresponding to this position?
It turns out that there is no sense in the CPositionInfo class, because normally you can work with only one object of this class.