How do I get Volume data on Expert adviser?

1.3k views Asked by At

How do I get Volume data on Expert Adviser? (not Indicator)

I know that way to get Volume on Indicator. So I want to bring Volume data to Expert Adviser.
How do I do it?

1

There are 1 answers

2
Daniel Kniaz On BEST ANSWER
long value = iVolume(Symbol(), 0, 0); //mt4

long value = iVolume(Symbol(), 0, 0); 
long iVolume(const string symbol,const ENUM_TIMEFRAMES tf, const int shift){
   long timeseries[1];
   if(CopyTickVolume(symbol,tf,shift,1,timeseries)==1)
      return timeseries[0];
   return -1;
}  // mt5, CopyRealVolume is same