How to work with MarketInfo() command?

 

Hello everybody,

In my previous question placed about the MarketInfo command, I wasn't clear enough what I want to achieve. I'd like to explain this better here:

I'm currently writing a Risk management application and as part of it, I calculate the Pip value in my accounting currency.

As an example:

Accounting in: USD

Trading Chart: EURGBP

Cross currency pair: GBPUSD (pair used for cross rate calculation)

So, trading the EUR/GBP pair, I want to access the ask price in the Market Watch file using the MarketInfo("GBPUSD",10) command.

And that's when MarketInfo does not perform as expected. I receive no information for the pair GBPUSD.

The question is why ?

Is MarketInfo designed to deliver information ONLY for the chart you have the Expert advisor attached to?

If you have an idea, this would be great.

Your help is appreciated. Thanks.

 
JuergZimmermann:
In my previous question placed about the MarketInfo command, I wasn't clear enough what I want to achieve. I'd like to explain this better here:
Then you asked the same exact question https://www.mql5.com/en/forum/132631

Don't double post

Reason: