Need help from experts! how to get objest value at time[0] in a EA from a indicator?

 

Hi,

This might be a very simple (or very tough?) question for the experts in this board.

Here is the code from a indicator:

ObjectCreate("pr"+sName,22,0,Time[p],fx[p]);

ObjectSet("pr"+sName,14,159);

ObjectSet("pr"+sName,OBJPROP_TIME1,Time[p]);

ObjectSet("pr"+sName,OBJPROP_PRICE1,fx[p]);

Question is: how to get the value fx[0] at time[0] in the EA?

I don't see any coding samples in the EAs I have.

Thanks in advance

Jimmy

 

Here is the indicatior

Files:
_ang-1day.mq4  4 kb
 

"fx" is indicator buffer number 0. Use iCustom(..., 0,0). Of course, generally not a good ide, since the indicator fills and refills fx[0] by the ever changing Close[0] while the bar is developing. Or maybe that's just what you want....

 

Got it.

Thanks lot!

 

this is exactly what i was looking for..

Reason: