Price at particular time

Hello,

I need to store low and high price of 3rd candle (5 mins candle). how do I get these numbers in variable?

Also, can I use variable globally? Like is I make 1% profit from buy price trigger sell. how do I transfer buy price to sell window??

thanks in advance.

you can use SET function like
SET A = REF(HIGH,3)