CalendarEventByCountry
Takvimdeki tüm olayların açıklamalarını belirtilen ülke koduna göre elde edin.
int CalendarEventByCountry(
string country_code,
MqlCalendarEvent& events[]
);
|
Parametreler
country_code
[in] Kod olarak ülke adı (ISO 3166-1 alpha-2)
events[]
[out] Belirtilen bir ülke için tüm olayların açıklamalarını almak için MqlCalendarEvent tip dizisi.
Geri dönüş değeri
- 4001 – ERR_INTERNAL_ERROR (genel çalışma zamanı hatası),
- 4004 – ERR_NOT_ENOUGH_MEMORY (istek yürütmek için yeterli bellek yok),
- 5401 – ERR_CALENDAR_TIMEOUT (istek süresi sınırı aşıldı),
- ArrayResize()'ın başarısız yürütme hataları
Örnek:
//+------------------------------------------------------------------+
//| Script programı başlatma fonksiyonu |
//+------------------------------------------------------------------+
void OnStart()
{
//--- AB için ülke kodu (ISO 3166-1 Alpha-2)
string EU_code="EU";
//--- AB olaylarını al
MqlCalendarEvent events[];
int events_count=CalendarEventByCountry(EU_code,events);
//--- AB olaylarını Günlük'te görüntüle
if(events_count>0)
{
PrintFormat("AB olayları: %d",events_count);
ArrayPrint(events);
}
//---
}
/*
Sonuç:
AB olayları: 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
...
*/
|
Ayrıca bakınız
CalendarCountries, CalendarCountryById