Extracting the name of the symbols whose chart is on the open on the screen

 
How can I extract the name of the symbols whose chart is on the open on the screen?
 
alighasemi1993:
How can I extract the name of the symbols whose chart is on the open on the screen?

try this 

void get_open_chart_symbols(string &receiver[]){
int total_charts=0;
long search=ChartFirst();
while(search!=INVALID_HANDLE){
     total_charts++;
     ArrayResize(receiver,total_charts,0);
     receiver[total_charts-1]=ChartSymbol(search);
     search=ChartNext(search);
     }
}

int OnInit()
  {
//---
  string symbols[];
  get_open_chart_symbols(symbols);
  for(int i=0;i<ArraySize(symbols);i++){
     Print(symbols[i]);
     }
//---
   return(INIT_SUCCEEDED);
  }