Reputation: 4014
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?
Upvotes: 0
Views: 1652
Reputation: 4681
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
Upvotes: 1