History File Name

 
Hello,
Can you shed some light as to what is the expected name of a file with daily historical values according to the CSV2HST converter example you posted on another thread:

//+------------------------------------------------------------------+
//| usage 1: csv2hst SSSSSSSP.csv |
//| usage 2: csv2hst file.csv SSSSSSSP.hst |
//+------------------------------------------------------------------+

I am interpreting it as EURUSDD1.hst, is that correct? If so then according to the code the symbol should be EURUSDD and it is not the symbol of the application created filenames.

The full code block posted is at:
"How to add new symbol ?"
 
D1 is reserved identifier for daily charts
EURUSDD1 means EURUSD as symbol and D1 as timeframe
 
Slawa,
Thanks alot for the clarification. Probably my last question, hopefully you can help me figure out this. I am using the below C# code to read the history files generated by MT4 & 3.

public void ReadFile()
{
string fp = @"C:\Program Files\MetaTrader 4\history\MIG-Demo\AUDJPY60.hst";
FileStream fs = new FileStream(fp, FileMode.Open);
BinaryReader br = new BinaryReader(fs);
while (br.PeekChar() > -1)
{
// I uncomment the below two lines for the 1st loop to get the version number.
//Console.Write("<>");
//Console.Write(br.ReadInt16());
Console.Write("<>");
Console.Write(br.ReadString());
}

}
As you see the output is not anything like the expected
"1 Copyright 2002-2003, MetaQuotes Software Corp. AUDJPYH1" + data rows. Do you think it is only due to incompatible data types (C int vs C# int16, C string[64] vs C# string[]) or I am doing something fundamentally wrong? I am not sure if string[64] is padded with NULLs or, it is automatically resized once a shorter string is populated into the array.
MetaTrader4:
<>400<><><>C)opyright 2003, MetaQuotes Software Cor<>.<>@fffffFQ@fffffFQ@fffffFQ@
MetaTrader3:
<>1<><><>opyright 2002-2003, MetaQuotes Software Corp.<>F<>oOn?Mb?Gz?On

Your opinion is much appreciated.
 
Hi Slawa,
Probably answering this question will be more useful than trying to figure out why Microsoft's binary reader does not work as expected:
If I am to create the binary file myself, the header of a daily file for MetaTrader3 should look like this:
version copyright[64] symbol[8] period
1 Copyright 2002-2003, MetaQuotes Software Corp. AUDJPYD1 1440
Can you correct me if I am getting this wrong ?
 
See Period_converter script as sample. It provides right header for MT4 history file.

I was wrong about D1 identifier, sorry. Of course, 1440 is identifier for daily timeframe
 
Hi Slawa,
Would you share the datatypes and the data structure of the MT3 profiles\securities.sym or MT4 hystory\...\symbols.raw and symbols.sel files so I can add new securities to the already existing list?
Reason: