rates

samjesse

Active Trader
Aug 30, 2011
118
0
27
Hi

I am not getting the last price with this code, is there a problem?

thx

MQL5:
      string names[5];
      names[0]=("EURUSD");
      names[1]=("GBPUSD");
      names[2]=("USDCHF");
 
for(uchar i=0;i<ArraySize(names);i++)
  {
      double deal_last; SymbolInfoDouble(names[i],SYMBOL_LAST,deal_last);  
      FileWrite(filehandle,names[i],deal_last);
  }
 
Last edited by a moderator:

samjesse

Active Trader
Aug 30, 2011
118
0
27
MQL5:
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
   ...
  {
 
     double d; SymbolInfoDouble(_Symbol,SYMBOL_LAST,d);
     Print(d);

prints:
0
0
...
0
 
Last edited by a moderator: