Download MetaTrader 5

Scripts: Export historical data

To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Automated-Trading
Admin
99373
Automated-Trading 2010.06.15 14:43 

Export historical data:

The script purpose is to export historical rates data to format, convenient for analysis in external programs.

The output file contain the historical price data (bars) of the specified month in the following form:

 DoubleToString(rates[i].time,0),      // number of seconds, passed from 1 Janunary 1970
              rates[i].open,         // Open
              rates[i].high,         // High
              rates[i].low,          // Low
              rates[i].close,        // Close
              rates[i].tick_volume,  // Tick Volume
              tm.year,               // year
              tm.mon,                // month
              tm.day,                // day
              tm.hour,               // hour
              tm.min,                // minutes
              tm.day_of_week,        // week day (0-sunday, 1-monday)
              tm.day_of_year);       // day index in the year (1st January is the 0-th day of the year)

Author: Prival

To add comments, please log in or register