- iVolumes returns an int (handle) not a double.
- Where do you get multiple values from CopyBuffer and where do you average them?
- iVolumes returns an int (handle) not a double.
- Where do you get multiple values from CopyBuffer and where do you average them?
Thank you for your answer.
I'm really dont know. I tried to used some code that I was used to get iATR value, but did not worked to iVolumes.
Even when I try just to get a unique value from one TimeFrame of iVolumes, it returns a wrong value.
Do you have any sugestion of a code which returns the average of volumes value?
Do you have any sugestion of a code which returns the average of volumes value?
Do you know you don't need any code for that ?
MetaTrader Trading Platform Screenshots
Alpari International Limited, MetaTrader 5, Demo
Volumes averaged by MA indicator. Not coding needed.
Do you know you don't need any code for that ?
Hello Alain,
I know how to do this on chart, but I would like to use this information on my EA to complement as a filter.
I tried this code, but always return 0.
int vol_filter() { int volumes = iVolumes(_Symbol,PERIOD_M30,VOLUME_REAL); double vol_buffer[]; int result; result = CopyBuffer( volumes ,0,0,1, vol_buffer ); if (result <0) return (0); else return (result); }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
How could I return the average value of x periods from volume indicator?
I tried to use the code below, but it is not working properly also.