Why this simple script returns nothing?

 
void OnStart()
  {
//---
   CSymbolInfo *mysymbol=new CSymbolInfo;
   
   Alert(mysymbol.Name());
   
   return;
  }
I tried declaring the csymbolinfo object above, but its still nothing. Any help appreciated. 
 

At first you should set symbol name. Then you will be able to get properties of it.

void OnStart()
  {
//---
   CSymbolInfo *mysymbol = new CSymbolInfo;
   mysymbol.Name("EURUSD");
   
   Alert(mysymbol.Name());
   
   delete mysymbol; // do not forget delete pointers
   return;
  }
 
WWer:

At first you should set symbol name. Then you will be able to get properties of it.

 

Finally. Thx for this BIG help.


Reason: