First of all we need MT4 to Excel exporter. Future i will share my special excel indicators.
This indicator was created by "hanover" . I made only few changes for stabilty.
Either one of these will output OHLCV history to CSV files, simultaneously for up to 40 pairs/instruments, and 9 timeframes, allowing easy import to Excel. A separate file is created for each pair/timeframe combination. The indicator runs it once every time a new price tick occurs, overwriting the relevant file(s).
Each bar in the chart occupies one line (row) in the file. Data in each row is output in the following order: date/time, open, high, low, close, volume
PARAMETERS:
CurrencyPairs: leave blank to output only for the pair on whose chart the script/indicator is attached. Otherwise type in up to 40 pairs, separated by commas. Upper or lowercase doesn’t matter, and you may use the following abbreviations: A=AUD, C=CAD, F=CHF, E=EUR, G=GBP, J=JPY, N=NZD, U=USD. Hence you could type something like: EU,GU,UF,UJ which works the same as EURUSD,GBPUSD,USDCHF,USDJPY
TimeFrames: leave blank to output only for the timeframe on whose chart the script/indicator is attached. Otherwise type in up to 9 timeframes, separated by commas. Upper or lowercase doesn’t matter. For example, to output for all 9 timeframes, copy this:
M1,M5,M15,M30,H1,H4,D1,W1,MN
Hence the above entries would create 36 different files (4 pairs x 9 timeframes).
DifferentSubfolderPerTimeFrame: if set to FALSE, all files will be output to your …/experts/files folder. If set to TRUE, subfolders will automatically be created under this folder, e.g. …/experts/fiels/H1, and the output file(s) will be created in the subfolders.
Regardless of the folder, all files are named: [pair],[timeframe].CSV
LookbackBars: OHLCV values for the most recent (rightmost) ‘n’ bars will be output, where ‘n’ is the value you type here. If you specify either 0, or a very large number (e.g. 999999), then all values for all bars in the chart history will be output. WARNING: if using the indicator, then outputting a very large amount of data repeatedly on every price tick may bring MT4 to a standstill.
DescendingDateTimeOrder: if set to FALSE, data is output in chronological order, i.e. earliest bar values at the start of the file. If set to TRUE, data is output in reverse chronological order, i.e. most recent bar values at the start of the file.
OutputHeaderLine: if set to TRUE, it will output one line (row), with column headings, at the start of the file. If set to FALSE, no header line will be output.
FieldSeparator: set this to the delimiter character(s) you wish to appear between column vales that are outputs. Default is a semicolon ( ; ). DO NOT CHANGE
EncloseValuesInQuotes: if set to TRUE, each data value will be enclosed in double quotes, e.g. “1.3659”.
DateTimeFormat,
Note that date and time, by default, are output as one field. If you want them to appear as separate fields, you must include a field separator (and quotes, if desired) inside the DateTimeFormat, e.g. M/D/Y","H:I
Y = 4 digit year
y = 2 digit year
M = 2 digit month
m = 1-2 digit Month
N = full month name, e.g. November
n = 3 char month name, e.g. Nov
D = 2 digit day of Month, e.g. 01, 31
d = 1-2 digit day of Month, e.g. 1, 31
T or t = append 'th' to day of month, e.g. 14th, 23rd, etc
W = full weekday name, e.g. Tuesday
w = 3 char weekday name, e.g. Tue
H = 2 digit hour (defaults to 24-hour time unless 'a' or 'A' included)
h = 1-2 digit hour (defaults to 24-hour time unless 'a' or 'A' included)
a = convert to 12-hour time and append lowercase am/pm
A = convert to 12-hour time and append uppercase AM/PM
I or i = minutes in the hour
S or s = seconds in the minute
PriceFormat,
n = number of digits to output, to the left of the decimal point
n.d = output n digits to left of decimal point; d digits to the right
-n.d = floating minus sign at left of output
n.d- = minus sign at right of output
+n.d = floating plus/minus sign at left of output
These characters may appear anywhere in the string:
( or ) = enclose negative number in parentheses
$ or £ or ¥ or € = include floating currency symbol at left of output
% = include trailing % sign
, = use commas to separate thousands, millions, etc
Z or z = left fill with zeros instead of spaces
* = left fill with asterisks instead of spaces
R or r = round result in rightmost displayed digit
B or b = blank entire field if number is 0
~ = show tilde in leftmost position if overflow occurs
; = switch use of comma and period (European format)
L or l = left align final string
T ot t = trim (remove all spaces from) end result
These files are not specific for MT4.
Choose for operating sistem (windows etc.) or Office version. Otherwise excel formulas will not work and u will see different values.
Indicator for EU standarts (1,12345) History_exGOMMA.ex4
Indicator for US standarts (1.12345) History_exDOT.ex4
Bookmarks