Don't place this code in OnInit().
double num_array[3]; for(int i=0;i<3;i++) { num_array[i]=iStochastic(_Symbol,_Period,KPeriod,DPeriod,Slowing,StochMethod,StochPrice,MODE_MAIN,i); } int maxValueIdx=ArrayMaximum(num_array,WHOLE_ARRAY,0); double high=iHigh(NULL,0,maxValueIdx); datetime time=iTime(NULL,0,maxValueIdx); bool line1=ObjectCreate("Thumb",OBJ_ARROW_THUMB_UP,0,time,high);
double num_array[3]={s1,s2,s3};Only initializing with constants can use that form.
angevoyageur:
Thanks!
Don't place this code in OnInit().
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
I have tried to assign each object but the array doesn't understand the objects.
So here i'm stuck on figuring how I get ArrayMaximum () function to understand the iStochastic values.