SymbolInfoTick last price is 0 - page 2

 
Eduardo Fernando Teixeira #:

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?

 Hi Eduardo, I´m programming an EA and I have the same problem that you report (last price in Fx) , colud you solve it?
 
Arturo Gomez #:
 Hi Eduardo, I´m programming an EA and I have the same problem that you report (last price in Fx) , colud you solve it?
Use SymbolInfoTick() to get the last tick information. There is no problem to solve.
 
Arturo Gomez #Hi Eduardo, I´m programming an EA and I have the same problem that you report (last price in Fx) , colud you solve it?

There is no "last price" in FX. For FX the charts show bid prices, so use the bid price.


 
Alain Verleyen #:
Use SymbolInfoTick() to get the last tick information. There is no problem to solve.
Ask and Bid by CSymbolInfo class are good too? Sometimes I have problems…
 
Fernando Carreiro #:

There is no "last price" in FX. For FX the charts show bid prices, so use the bid price.


What would be the Last price?