Hello Nuria,

Candle ID 0 is for the current one, so its close value, for example, is dynamic.
If you use ID 1, you are working with the last closed candle.

Hope it helps,
David