Download MetaTrader 5

How to obtain values ​​for purchase / sale of the EURUSD

To add comments, please log in or register
Leudasdf
5
Leudasdf  
Good!

I'm new to MQL4 programming and mql5 and I liked to obtain values ​​for purchase / sale of the EURUSD. I wanted to show these values ​​in the graph window EURUSD currency.

Is this possible?

I tried obtrer values ​​using the following code:

  MarketInfo double price = ("EURUSD", Bid);
double priceask MarketInfo = ("EURUSD", Ask);

However I put an alert and the values ​​obtained but the bid and ask were the same what I think should not be right?
onewithzachy
2271
onewithzachy  
Leudasdf:
Good!

I'm new to MQL4 programming and mql5 and I liked to obtain values ​​for purchase / sale of the EURUSD. I wanted to show these values ​​in the graph window EURUSD currency.

Is this possible?

I tried obtrer values ​​using the following code:

  MarketInfo double price = ("EURUSD", Bid);
double priceask MarketInfo = ("EURUSD", Ask);

However I put an alert and the values ​​obtained but the bid and ask were the same what I think should not be right?

Great !

Hi Leudasdf,

MarketInfo in MQL5 (click here) is a little bit different than MQL4. In your case, try to use MarketInfo's SymbolInfoDouble() (click here) or SymbolInfoTick() (click here). There are some example if you click around over there.

 

To add comments, please log in or register