Download MetaTrader 5

Ticks

To add comments, please log in or register
deltatangoxray
10
deltatangoxray 2016.08.17 19:15 
How can I get the current price (last tick) of a given symbol? I have tried calling the MqlTick and SymbolInfoTick, but this has failed to return the last tick.

Code:
MqlTick lastTick;
SymbolInfoTick(Symbol(),lastTick);
double price = lastTick.last;

Output:
price = 0.000000000



Thank you for any assistance on this.
To add comments, please log in or register