int FileOpenHistory(string filename, int mode, int delimiter=';')
Opens file in the current history directory (terminal_directory\history\server_name)
or in its subfolders. Returns the file handle for the opened file. If the
function fails, the returned value is -1. To get the detailed error information,
call the GetLastError() function.
現在のヒストリー ディレクトリ(terminal_directory\history\server_name)または、そのサブフォルダからファイルを開きます。開いたファイルのファイル
ハンドルを返します。もし、関数が失敗した場合は、-1 の値を返します。詳細なエラー情報を取得するには、GetLastError()
関数を呼び出します。
Notes: Client terminal can connect to servers of different brokerage companies.
History data (HST files) for each brokerage company are stored in the corresponding
subfolder of the terminal_directory\history folder.
注意:クライアント ターミナルは異なった証券会社のサーバーに接続することができます。それぞれの証券会社のヒストリーデータ(HSTファイル)が
terminal_directory\history フォルダ内の対応するサブフォルダに保存されます。
The function can be useful to form own history data for a non-standard
symbol and/or period. The file formed in the history folder can be opened
offline, not data pumping is needed to chart it.
この関数は、標準以外の通貨ペアや時間枠のヒストリー データを形成するのに有効利用することができます。ヒストリー フォルダーで形成されたファイルは、オフラインで開くことができ、データのくみ上げはありませんが、それをチャート化するために必要とされます。
Parameters:
パラメータ:
filename - Filename.
ファイル名。
mode - Opening mode. It can be one or combination of values:
FILE_BIN, FILE_CSV, FILE_READ, FILE_WRITE.
開示モード。次の値の1つもしくは、組み合わせを選択できます。
FILE_BIN、FILE_CSV、FILE_READ、FILE_WRITE。
delimiter - Delimiter character for csv files. By default, the ';' symbol applies.
csvファイルのための区切文字。デフォルトでは ';' 記号が適用されます。
Sample:
サンプル:
int handle=FileOpenHistory("USDX240.HST",FILE_BIN|FILE_WRITE);
if(handle<1)
{
Print("Cannot create file USDX240.HST");
return(false);
}
// work with file
// ...
FileClose(handle);
|