MQ4, array problem, error: constant expression required
1) Please use the SRC-button if you post code (the SRC-icon of the top line of the online editor).
2) I guess (you don't post the whole code), that EURstrenght are valiables. You cant declare array using variables - you need to do that after that!
num_array1[0] =EURstrenght;
num_array1[1] =USDstrenght;
:
num_array1[0] =EURstrenght;
num_array1[1] =USDstrenght;
:
Thank you for this post!!!!!!! You just made my Array!!!!
Have to thank you too! Made me solve the problem quickly.
While the genuine error message "constant expression required" wasn't very helpful for me. As declaring the array elements "const" didn't help anything.
Great to have access to a forum like this ♥
num_array1[0] =EURstrenght;
num_array1[1] =USDstrenght;
:
Please help some experienced coder.
After compiling get error constant expression required.
Problem is in array, strenghts is in pips. My idea is to get stongest and weakest pairs.
Code:
int num_array1[8] ={EURstrenght,USDstrenght,AUDstrenght,NZDstrenght,CADstrenght,GBPstrenght,CHFstrenght,JPYstrenght};
int maxval=ArrayMaximum(num_array1);
int minval=ArrayMinimum(num_array1);
int max=num_array1[maxval];
int min=num_array1[minval];
Get errors EURstrenght - constant expression required
USDstrenght - constant expression required.... etc