Teach me buffer, please.

 
I am confused and will appreciate if you could help me understand buffer.
Buffer[] is an array...correct me if I'm wrong.
Then, Buffer[5] is the 6th index in the Buffer[], or, is it an array called Buffer[] with 5 things inside?
 

Hello kikokiko

Please look here for specific arrays knowledge.

The complete reference https://book.mql4.com// is also important for learning...

Best

 

When you define buffer:

int Buffer[5]; - it means "Buffer[] with 5 things inside",

but in the code:

Buffer[5]=x; - it means "the 6th index in the Buffer[]".

 
Thank you fbj, and thank you very much Roger!