Yes. You must declare the variables static, otherwise they have no content at the begin of the function.

static var temp_EURUSD;
static var temp_GBPUSD;