Dear All,
I have the above simple indicator with the error of "constant Expression Required" after compilation. Kindly help.
thank you
double S_Array[]={.....};can contain only constants, no variables nor expressions.
chuale:
Dear All,
I have the above simple indicator with the error of "constant Expression Required" after compilation. Kindly help.
thank you
You should read about the use of arrays (a bit out-dated) and dynamic arrays!
1) You defined a static array which cannot change the size:
double S_Array[5]; ... S_Array[27]={EmaEURUSD,EmaGBPUSD,EmaAUDUSD,EmaEURJPY,EmaGBPJPY}; // no compiler error here?
2) As Ovo said you can only assign values (numbers, strings) to an array - one by one, like:
S_Array[0] = EmaEURUSD;
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register