CalendarEventByCountry
指定された国コードでカレンダーで利用可能なすべてのイベントの説明の配列を取得します。
int CalendarEventByCountry(
string country_code,
MqlCalendarEvent& events[]
);
|
パラメータ
country_code
[in] 国コード名(ISO 3166-1 alpha-2)
events[]
[out] 指定された国の説明を受け取るためのMqlCalendarEvent型配列
戻り値
- 4001 – ERR_INTERNAL_ERROR(一般的なランタイムエラー)
- 4004 – ERR_NOT_ENOUGH_MEMORY(メモリが操作完了に不充分)
- 5401 – ERR_CALENDAR_TIMEOUT(リクエスト制限時間の超過)
- ArrayResize()操作の実行エラー
例:
//+------------------------------------------------------------------+
//| スクリプトプログラム開始関数 |
//+------------------------------------------------------------------+
void OnStart()
{
//--- EUの国コード(ISO 3166-1 Alpha-2)
string EU_code="EU";
//--- EUイベントを取得する
MqlCalendarEvent events[];
int events_count=CalendarEventByCountry(EU_code,events);
//--- EUイベントを操作ログに表示する
if(events_count>0)
{
PrintFormat("EU events: %d",events_count);
ArrayPrint(events);
}
//---
}
/*
結果:
EU events: 56
[id] [type] [country_id] [unit] [importance] [multiplier] [digits] [event_code]
[ 0] 999010001 0 999 0 2 0 0 "ECB Non-monetary Policy Meeting"
[ 1] 999010002 0 999 0 2 0 0 "ECB Monetary Policy Meeting Account
[ 2] 999010003 0 999 0 3 0 0 "ECB Monetary Policy Press Conferenc
[ 3] 999010004 0 999 0 3 0 0 "ECB President Draghi Speech"
[ 4] 999010005 0 999 0 2 0 0 "ECB Vice President Constancio Speec
[ 5] 999010006 1 999 1 3 0 2 "ECB Deposit Facility Rate Decision"
[ 6] 999010007 1 999 1 3 0 2 "ECB Interest Rate Decision"
[ 7] 999010008 0 999 0 2 0 0 "ECB Economic Bulletin"
[ 8] 999010009 1 999 2 2 3 3 "ECB Targeted LTRO"
[ 9] 999010010 0 999 0 2 0 0 "ECB Executive Board Member Praet Sp
[10] 999010011 0 999 0 2 0 0 "ECB Executive Board Member Mersch S
...
*/
|
参照
CalendarCountries、CalendarCountryById