Reading symbol price

 

Hi

I want to know if there is a way of displaying either via an indicator or EA current prices of other symbols other than the one the indicator or EA is attached to.

I have not been able to find anything to assist in the online documentation either....

currentprice=Ask(symbol(AUSUSD));

Is what i am looking for.....

Regards Phillip

 
aud4xtrader:

Hi

I want to know if there is a way of displaying either via an indicator or EA current prices of other symbols other than the one the indicator or EA is attached to.

I have not been able to find anything to assist in the online documentation either....

The Documentation can be a little obscure in the way it is organised . . . there is a function though that will do just what you want . . . MarketInfo() used with MODE_BID
 

https://docs.mql4.com/common/MarketInfo

 double Ask_AUDUSD = MarketInfo ("AUDUSD",MODE_ASK);
 double Bid_AUDUSD = MarketInfo ("AUDUSD",MODE_BID);