Is there something that I'm doing wrong?

 

It's been a while since I've been back to coding, but the following code doesn't seem to return the values I'm looking for, just zeros.

double vDO=iOpen("NZDUSD",1440,0); // Daily Open double vDC=iClose("NZDUSD",1440,0); // Daily Close Alert("vDO = ",vDO," vDC = ",vDC); No matter where I place the code within an EA or indicator, I just get zeros. Can I not assign a value of iOpen or iClose to a variable anymore?

Thanks!

 
Yellowbeard:
It's been a while since I've been back to coding, but the following code doesn't seem to return the values I'm looking for, just zeros.

double vDO=iOpen("NZDUSD",1440,0); // Daily Open double vDC=iClose("NZDUSD",1440,0); // Daily Close Alert("vDO = ",vDO," vDC = ",vDC); No matter where I place the code within an EA or indicator, I just get zeros. Can I not assign a value of iOpen or iClose to a variable anymore?

Thanks!

I am getting correct values

Do you have "NZDUSD" in the symbols list and is it enabled in the market watch?

Reason: