Error in finding highest volume
double hiVolume; int val_index = iHighest(NULL,0,MODE_VOLUME,20,2); if (val_index!=-1) hiVolume = Volume[val_index];
The predefined variable Volume[] is defined as "long", not a "double".
Get into the habit of always checking the documentation when you get Warnings, Errors or in general when coding!
Also, please use the SRC button when adding code to posts.
- docs.mql4.com
The predefined variable Volume[] is defined as "long", not a "double".
Get into the habit of always checking the documentation when you get Warnings, Errors or in general when coding!
Also, please use the SRC button when adding code to posts.
Fernando,
Thank you for pointing out my mistakes. I appreciate your help.
Hi everybody,
I am new to coding and need help to find the highest volume but keeps getting error message "possible loss of data due to type conversion".
double hiVolume;
int val_index = iHighest(NULL,0,MODE_VOLUME,20,2);
if (val_index!=-1) hiVolume = Volume[val_index];
Can anybody point out where is the mistake and how to correct it?
Thanks a lot.