Counting Trade volume in MT4

 

Hi..Ive looked around in MQL documentaiton to see if there is something that could help me count my trade volume in each candle, but couldnt find anything. The only function i found was Volume[0], which calculates the total volume for the bar, which is not what I want.

Is there any function, or any simple way to count total number of trades ive made in a candle? Any hints or help would be greatly appreciated.

Thanks guys. 

 

Yes, find the open time of the candle and the open time of the following candle(or TimeCurrent() if the candle is the current candle.

Loop through open orders and history and find trades that the OrderOpenTime() >= the open time of the candle and < the other time value. 

Reason: