I've managed to figure this out but thought I'd leave this here for anyone else that comes across this.
CopyRates has a return value which is described below
Returns the number of copied elements or -1 in case of an error.

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 trying to understand how to code some error checks for Copyrates and copybuffer. I'm struggling to understand the logic in the example. I don't understand the if copied is greater than 0 line. Is this checking elements of the array or something else? Is there a good article on how to go about this? I know I can just copy this code and it will work but would like to understand it. Thanks in advance for any help offered