Export Daily open close etc etc in a csv file

 

How i can do it

export past daily data in csv file, i try to add thi on my chart but don't work

if i put it in scripts it's work but give me just one day!!! i want like one year high,low etc etc of daily bar

int start()
  {
 static int  flag;
 int handle,i;
 

   
//===========================================================
  double EURUSD_CLOSE[],EURUSD_HIGH[], EURUSD_LOW[], EURUSD_Volume;
        
         for(i=1;i<=3000;i++)
         {
         EURUSD_CLOSE[i]=  iClose("EURUSD",PERIOD_D1,i);
         EURUSD_HIGH[i]=  iHigh("EURUSD",PERIOD_D1,i);
         EURUSD_LOW[i]=  iLow("EURUSD",PERIOD_D1,i);
         }
//===========================================================
 

        
        
 handle=FileOpen("Daily_CHL.csv", FILE_CSV|FILE_WRITE, ',');
   if(handle>0)
   //FileWrite can only handle 63 parameters at a time. The first 60 are in one FileWrite command, the rest are in the second. 
   //When imported into a spreadsheet, each new FileWrite command will generate a new row.
    {
     FileWrite(handle,
     DoubleToStr(EURUSD_CLOSE,4), DoubleToStr(EURUSD_HIGH,4), DoubleToStr(EURUSD_LOW,4)
 
     );
     FileClose(handle);
     Comment(" D1 Exported ");
    }

    return(0);
 
}        
 

Open a daily chart

Menu -- File -- "Save As..." will make a csv for you

 

You can use the "Export-RT-Historical-Data-for-Ramp" MT4 indicator. It creates real time streaming .csv files that you can open in excel or any other program. It is free at http://www.ramprt.com/mt4/Ramp-MT4-Connection-Instructions.htm.

Reason: