Download MetaTrader 5
To add comments, please log in or register
Articles can help you to solidify your knowledge. Come and read them!
Dennis
21
Dennis 2015.04.15 05:57 

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. 

Keith Watford
Moderator
7904
Keith Watford 2015.04.15 06:32  

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. 

/
To add comments, please log in or register