Download MetaTrader 5
To add comments, please log in or register
Freelance service: the safe way to order a trading robot. Try it!
AnchengLuo 2012.07.19 05:44 

I am totally new to EA. I am trying to get my position volume and use PositionGetDouble(POSITION_VOLUME) or PositionGetDouble(POSITION_VOLUME, myVolume). However, it return false which indicates that I couldn't access it. Is this because I am currently using demo account? Is this the same situation during the competition?

Thank you in advance to take care of this stupid question.

Documentation on MQL5: Trade Functions / PositionGetDouble
Trade Functions / PositionGetDouble - Documentation on MQL5
Andrey Barinov
Andrey Barinov 2012.07.19 07:28  

double Volume=PositionGetDouble(POSITION_VOLUME);
This should help. First you need to select your position, and then you can address it requesting different info.
To add comments, please log in or register