Anyone know the answer to this simple coding question?

 
I am trying to get the Euro to buy when the Close[1] > Open[1] and when the Eur/Aud Close [1] > Open[1]. Does anyone know how to do this all in one EA without the use of Global Variables? This would really help as then I could backtest this theory. Thanks all.

Matt
 
see iClose() , iOpen()
 
Thanks!
Reason: