rlevy1234 wrote >>
Hi, can you suggest how to make an array of indicator buffers? The following did not work (SetIndexBuffer not seeing param2 as an array)...
double buffer[][5];
...
for(int i = 0; i<5; i++) {
SetIndexBuffer(i,buffer[,i]);
}
Thanks,
Bob
I don't think you can leave the first subscript blank...
SetIndexBuffer(i,buffer[,i]);
has to be:
SetIndexBuffer(i,buffer[ SomeVariableHere ,i]);
How are you Bob? are you Sr. or Jr.? I live in Mentor...
Thanks Peter. Unfortunately SetIndexBuffer seems to accept only a 1d array as input (buffer[] is a common example seen in sample code).
For cleaner code, I would like to create a 2d array, buffer[][n], and then loop through the second index on each SetIndexBuffer call (rather than write the same line of code n times).
Any ideas of valid syntax to achieve this?
Thanks,
Bob
For cleaner code, I would like to create a 2d array, buffer[][n], and then loop through the second index on each SetIndexBuffer call (rather than write the same line of code n times).
Any ideas of valid syntax to achieve this?
Thanks,
Bob
May I do it with class in MQL5.
It can be compiled.
0 error(s), 0 warning(s),
but, 0 indicator(s).
look my code:
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
Hi, can you suggest how to make an array of indicator buffers? The following did not work (SetIndexBuffer not seeing param2 as an array)...
double buffer[][5];
...
for(int i = 0; i<5; i++) {
SetIndexBuffer(i,buffer[,i]);
}
Thanks,
Bob