What is Csymbol used for?

 
This code works in the tester, but not in the terminal

I can go through iclose and the rest, but this was unexpected behavior.
Files:
Csymbol.mq5  2 kb
 
Thank you. I'll do as usual.
 
Gerard William G J B M Dinh Sy:
This code works in the tester, but not in the terminal

I can go through iclose and the rest, but this was unexpected behavior.

Because you are checking "Last" price on a symbol which doesn't have a last price.

Seems it behaves differently in the Tester...

 
Alain Verleyen #:

Because you are checking "Last" price on a symbol which doesn't have a last price.

Seems it behaves differently in the Tester...

?
 
Gerard William G J B M Dinh Sy #:
?
Do you know what "Last" price is ?
 
Alain Verleyen #:

Because you are checking "Last" price on a symbol which doesn't have a last price.

Seems it behaves differently in the Tester...

Previously tick.last was always set (and equal to bid price for forex/cfd) symbols. Now it's 0 on a live chart but not on the Tester.

Seems there is either a bug or an undocumented change in tick Last price processing.

 
Thanks you 
 
the concern can be quite deep anyway

because

   double             Last( void )     const { return (m_tick.last); }
   MqlTick            m_tick;                       // structure of tick;
And
 bool CSymbolInfo::RefreshRates( void )
  {
   return ( SymbolInfoTick (m_name,m_tick));
  }
it's more than basic