if values of one type also are connected by sense, then - so
Note that u can't initialize an array with variables, it won't compile. It can only be initialized with constants.
You can do this:
Also, using defines helps for clarity:
You can do this:
double myarray[8]; myarray[0] = a; myarray[1] = b; // and so on...
Also, using defines helps for clarity:
#define A 0 #define B 1 //... myarray[A] = a; myarray[B] = b;(this example is not the best since the variable names are meaningless by themselves, but the point is clear).
Have anyone ever encountered occasion where iHighest(.... WHOLE_ARRAY...) doesn't work? This post reminds me having this problem then resorting to MathMax().
cameofx:
Have anyone ever encountered occasion where iHighest(.... WHOLE_ARRAY...) doesn't work? This post reminds me having this problem then resorting to MathMax().
Have anyone ever encountered occasion where iHighest(.... WHOLE_ARRAY...) doesn't work? This post reminds me having this problem then resorting to MathMax().
nevermind, I must've screwed up that time. I tested now it turned out fine...
double Hi_est_1 = High[iHighest(NULL,0,MODE_HIGH,WHOLE_ARRAY,0)]; double Hi_est_2 = High[iHighest(NULL,0,MODE_HIGH,Bars,0)]; double Hi_est_3 = 0.0; for(int i=Bars-1; i>=0; i--){ Hi_est_3 = MathMax(High[i],MathMax(Hi_est_3,High[i+1])); } Alert("Hi_est_1 = ", Hi_est_1," Hi_est_2 = ", Hi_est_2," Hi_est_3 = ", Hi_est_3);

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
Is there a shorter way to do this?
-Steve