ADATAwave59





//+__________________________________________________________________+
//| AgetData.mq4 |
//| Copyright 2005,fxpars |
//| 
//+__________________________________________________________________+
#property copyright "ooo"
#property link "aaa"
#property indicator_chart_window
extern int number_bars=2000;
extern int from_year = 1978;

int start()
{
int handle;
int cnt;
string strline;
string name_file;
name_file = Symbol()+ Period()+ ".prn";
handle = FileOpen(name_file , FILE_CSV|FILE_WRITE, "\t");
if(handle<1)
   {
   Print("cannot open file error_",GetLastError());
   return(0);
   }

   else
   {
   for (cnt=number_bars;cnt>=0;cnt--)
   if (from_year<TimeYear(Time[cnt]))
      {
      strline = TimeToStr(Time[cnt],TIME_DATE|TIME_SECONDS);
      strline =  StringSubstr(strline,5,2) + StringSubstr(strline,8,2) + StringSubstr(strline,0,4) +"," + StringSubstr(strline,11,5);
      strline = strline + "," + DoubleToStr(Open[cnt],4) + "," + DoubleToStr(High[cnt],4) + "," + DoubleToStr(Low[cnt],4) + "," + DoubleToStr(Close[cnt],4);// + "," + DoubleToStr(Volume[cnt],0);
      FileWrite(handle, strline);
      }
   FileClose(handle);
   return(0);
   }
}



Sample





Analysis



Market Information Used:

Series array that contains open time of each bar
Series array that contains close prices for each bar
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains open prices of each bar


Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features:

Uses files from the file system
It writes information to file