You get the warning because you do not initialize the array.
The array elements are given values but within the for loop. The compiler cannot detect this so it issues the warning.
Thanks, I am new to this and tbh the concept of arrays confuses me. I have a hard time grasping them. I changed the code to int candles[4] = {0}; and the
errors went away, but is that correct?
Peter Zyler: but is that correct?
Yes, because you initialized it in the for loop.

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'm hoping someone can help. This array was fine but all of a sudden I get this warning: possible use of uninitialized variable 'candles'. Not sure why the error.