Just checking, have you called the method CPositionInfo::Select(symbol) before to call CPositionInfo::Volume() ?
Yes, I did call CPositionInfo::Select(symbol) before I use it. But the Volume change so much, not for my holding position.
I think I should use: PositionGetDouble(POSITION_VOLUME)
Thanks.
Documentation on MQL5: Trade Functions / PositionGetDouble
- www.mql5.com
Trade Functions / PositionGetDouble - Documentation on MQL5
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
Hi,
In my EA, I need to adjust the volume according to m_position.Volume(), but it always return "0" during the beginning of test, but later, it jump to a big number, like 47666668, the numberjump very fast to an other big number like 1043269, then it stay at 47013514. It is not the volume that I hold in the position, it look like a trade volume of the whole market.
Can anybody help?
Thanks a lot