I want to check the volume of every order

 
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
Documentation on MQL5: Trade Functions
  • www.mql5.com
Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: