I want to check the volume of every order. Please help me how. Thanks
Be more specific, because I suspect you mean volume of open positions.
this can be done by a for loop:
double current_pos_volume = NULL; for(uint cnt = NULL; (cnt < PositionsTotal()) && !_StopFlag; cnt++) { // Select position to work with PositionGetTicket((int)cnt); // Read positions property current_pos_volume = PositionGetDouble(POSITION_VOLUME); }
for orders it looks similar, you need to replace the corresponding functions with orders functions, see docs...
https://www.mql5.com/en/docs/trading
Documentation on MQL5: Trade Functions
- www.mql5.com
Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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