Store value at close of 1min candle in a variable?

 

 Hello all,

 would appreciate help on the following question.

I would like to store the value for an indicator which I access with the function icustom 

-at the close of a candle (e.g. 1Min or 5Min)

I know that the number of ticks can vary and is not the same all the time.


Thank you,

Mauzi