SymbolInfoTick last price is 0

 

Hello,

i have problems to get the last tick price of a symbol pair. When I call the function SymbolInfoTick() and want to get the last tick from the MqlTick the result is 0.

SymbolInfoDouble(..., SYMBOL_LAST) is also 0.

How can I get the last tick price of a symbol pair ?

Best,

Tobi

 

Hi ttobii94,

Have you got some answer or solution to your problem?

because I have the same one :-(


Kind Regards

 

Hi ttobii94 and milgaz - same issue here, did you get any answer by any chance?

 
Perhaps "every tick" mode will solve the problem
 
Ilton Ornelas: Perhaps "every tick" mode will solve the problem

@Ilton Ornelas Do you really think they are still looking for an answer after two years?

 

Hello, I'm stuck in this problem too.


It's funny because it seems to be only with currency pairs in the Metaquotes Demo Server. When I log into a real account in a brazilian broker, I don't have this problem.

The GetLastError() also returns zero, which is the code for ERR_SUCCESS.

 
Eduardo Fernando Teixeira:

Hello, I'm stuck in this problem too.


It's funny because it seems to be only with currency pairs in the Metaquotes Demo Server. When I log into a real account in a brazilian broker, I don't have this problem.

The GetLastError() also returns zero, which is the code for ERR_SUCCESS.

Currency pairs don't have a last price.
 
Alain Verleyen:
Currency pairs don't have a last price.

thank you Alain

I found out that MqlTick.ask will show a value, but it's not really what I wanted.

Do you have any suggestion on how to get the last price? For example, how the indicators like RSI keep the line moving in real time? How do they get this information?

 
double ask = SymbolInfoDouble(Symbol(),SYMBOL_ASK);
double bid = SymbolInfoDouble(Symbol(),SYMBOL_BID);
Eduardo Fernando Teixeira:

thank you Alain

I found out that MqlTick.ask will show a value, but it's not really what I wanted.

Do you have any suggestion on how to get the last price? For example, how the indicators like RSI keep the line moving in real time? How do they get this information?

What are you looking for exactly ? 

 
Marco vd Heijden:

What are you looking for exactly ? 

I'm building an indicator and I'm struggling to update the values of a current ongoing bar. As I mentioned before, when I'm logged to a real account and I'm using the indicator in a stock or even an index, I don't have this problem, the indicator updates its value every new tick, and when moves on to the next bar will keep the close value of that previous bar. So, it's working exactly as I wanted.

I found out this problem only when trying to post my product in the market, when it failed that automated test, got a divide by zero error. I never used this Metaquotes Demo Account, then I discovered this thing that currency pairs don't display the last price.

But as I mentioned, there must be a way to get this information, because indicators like RSI or Moving Averages actually move in real time on the current bar, when the price moves. Do you have any suggestion?

 
William Roeder:

@Ilton Ornelas Do you really think they are still looking for an answer after two years?

Yes. People are.