21 February 2019
21 February 2019
bool CalendarCountryById( const long country_id, // country ID MqlCalendarCountry& country // country description );CalendarEventById — gets event description by identifier.
bool CalendarEventById( const long event_id, // event ID MqlCalendarEvent& event // event description );CalendarValueById — gets event value description by identifier.
bool CalendarValueById( const long value_id, // value ID MqlCalendarValue& value // value description );CalendarEventByCountry — gets the array of available events for the country.
bool CalendarEventByCountry( string country_code, // country code MqlCalendarEvent& events[] // array of events );CalendarEventByCurrency — gets the array of available events for the affected currency.
bool CalendarEventByCurrency( string currency, // currency MqlCalendarEvent& events[] // array of events );CalendarValueHistoryByEvent — gets the array of values for the specified time period, by event identifier.
bool CalendarValueHistoryByEvent( ulong event_id, // event ID MqlCalendarValue& values[], // array of values datetime datetime_from, // period beginning date datetime datetime_to=0 // period end date );CalendarValueHistory — gets the array of values for the specified time period for all events, filtered by country and/or currency.
bool CalendarValueHistory( MqlCalendarValue& values[], // array of values datetime datetime_from, // beginning of period datetime datetime_to=0, // end of period string country_code=NULL, // country code string currency=NULL // currency );CalendarValueLastByEvent — gets an array of last event values by identifier. This function enables the request of the values which have appeared since the previous request. The in/out parameter "change_id" is additionally used for this operation.
bool CalendarValueHistory( ulong event_id, // event ID ulong& change_id, // last calendar change ID MqlCalendarValue& values[] // array of values );CalendarValueLast — gets the array of last values for all events, filtered by country and/or currency. This function enables the request of the values which have appeared since the previous request. Similarly to CalendarValueLastByEvent, the "change_id" property is used for the request.
bool CalendarValueHistory( ulong event_id, // event ID ulong& change_id, // last calendar change ID MqlCalendarValue& values[], // array of values string country_code=NULL, // country code string currency=NULL // currency );
struct MqlCalendarCountry { ulong id; // country ID in ISO 3166-1 string name; // text name of the country string code; // code name of the country in ISO 3166-1 alpha-2 string currency; // country currency code string currency_symbol; // country currency symbol/sign string url_name; // country name used in URL on mql5.com };MqlCalendarEvent — event description.
struct MqlCalendarEvent { ulong id; // event ID ENUM_CALENDAR_EVENT_TYPE type; // event type ENUM_CALENDAR_EVENT_SECTOR sector; // sector to which the event belongs ENUM_CALENDAR_EVENT_FREQUENCY frequency; // event release frequency ENUM_CALENDAR_EVENT_TIMEMODE time_mode; // event release time mode ulong country_id; // country ID ENUM_CALENDAR_EVENT_UNIT unit; // unit for the event values ENUM_CALENDAR_EVENT_IMPORTANCE importance; // event importance ENUM_CALENDAR_EVENT_MULTIPLIER multiplier; // event importance multiplier uint digits; // number of decimal places in the event value string source_url; // source URL string event_code; // event code string name; // text name of the event in the terminal language };MqlCalendarValue — event value description.
struct MqlCalendarValue { ulong id; // value ID ulong event_id; // event ID datetime time; // event date and time datetime period; // period, for which the event is published int revision; // published indicator revision in relation to the reported period long actual_value; // current event value long prev_value; // previous event value long revised_prev_value; // revised previous event value long forecast_value; // forecast event value ENUM_CALENDAR_EVENT_IMPACRT impact_type; // potential impact on the currency rate };
enum ENUM_CALENDAR_EVENT_FREQUENCY { CALENDAR_FREQUENCY_NONE =0, // not used CALENDAR_FREQUENCY_WEEK =1, // weekly CALENDAR_FREQUENCY_MONTH =2, // monthly CALENDAR_FREQUENCY_QUARTER =3, // quarterly CALENDAR_FREQUENCY_YEAR =4, // yearly CALENDAR_FREQUENCY_DAY =5, // daily }; enum ENUM_CALENDAR_EVENT_TYPE { CALENDAR_TYPE_EVENT =0, // event (meeting, speech, etc.) CALENDAR_TYPE_INDICATOR =1, // indicator CALENDAR_TYPE_HOLIDAY =2, // holiday }; enum ENUM_CALENDAR_EVENT_SECTOR { CALENDAR_SECTOR_NONE =0, // no CALENDAR_SECTOR_MARKET =1, // market CALENDAR_SECTOR_GDP =2, // GDP CALENDAR_SECTOR_JOBS =3, // jobs CALENDAR_SECTOR_PRICES =4, // prices CALENDAR_SECTOR_MONEY =5, // money CALENDAR_SECTOR_TRADE =6, // trade CALENDAR_SECTOR_GOVERNMENT =7, // government CALENDAR_SECTOR_BUSINESS =8, // business CALENDAR_SECTOR_CONSUMER =9, // consumer CALENDAR_SECTOR_HOUSING =10, // housing CALENDAR_SECTOR_TAXES =11, // taxes CALENDAR_SECTOR_HOLIDAYS =12, // holidays }; enum ENUM_CALENDAR_EVENT_IMPORTANCE { CALENDAR_IMPORTANCE_NONE =0, // no CALENDAR_IMPORTANCE_LOW =1, // low CALENDAR_IMPORTANCE_MODERATE =2, // moderate CALENDAR_IMPORTANCE_HIGH =3, // high }; enum ENUM_CALENDAR_EVENT_UNIT { CALENDAR_UNIT_NONE =0, // no CALENDAR_UNIT_PERCENT =1, // percent CALENDAR_UNIT_CURRENCY =2, // national currency CALENDAR_UNIT_HOUR =3, // number of hours CALENDAR_UNIT_JOB =4, // number of jobs CALENDAR_UNIT_RIG =5, // number of rigs CALENDAR_UNIT_USD =6, // US dollar CALENDAR_UNIT_PEOPLE =7, // number of people CALENDAR_UNIT_MORTGAGE =8, // number of mortgages CALENDAR_UNIT_VOTE =9, // number of votes CALENDAR_UNIT_BARREL =10, // number of barrels CALENDAR_UNIT_CUBICFEET =11, // volume in cubic feet CALENDAR_UNIT_POSITION =12, // number of job positions CALENDAR_UNIT_BUILDING =13 // number of buildings }; enum ENUM_CALENDAR_EVENT_MULTIPLIER { CALENDAR_MULTIPLIER_NONE =0, // no CALENDAR_MULTIPLIER_THOUSANDS =1, // thousands CALENDAR_MULTIPLIER_MILLIONS =2, // millions CALENDAR_MULTIPLIER_BILLIONS =3, // billions CALENDAR_MULTIPLIER_TRILLIONS =4, // trillions }; enum ENUM_CALENDAR_EVENT_IMPACRT { CALENDAR_IMPACT_NA =0, // not available CALENDAR_IMPACT_POSITIVE =1, // positive CALENDAR_IMPACT_NEGATIVE =2, // negative }; enum ENUM_CALENDAR_EVENT_TIMEMODE { CALENDAR_TIMEMODE_DATETIME =0, // the source publishes the exact time CALENDAR_TIMEMODE_DATE =1, // the event takes the whole day CALENDAR_TIMEMODE_NOTIME =2, // the source does not publish the event time CALENDAR_TIMEMODE_TENTATIVE =3, // the source provides only date, but does not publish the exact time in advance, exact time is added when event occurs };
ERR_CALENDAR_MORE_DATA =5400, // the array is too small for the whole result (values which fit in the array were passed) ERR_CALENDAR_TIMEOUT =5401, // timed out waiting for a response to the calendar data request ERR_CALENDAR_NO_DATA =5402, // data not found
bool CharArrayToStruct( void& struct_object, // structure const uchar& char_array[], // array uint start_pos=0 // starting position in the array );StructToCharArray copies a POD structure to a uchar array.
bool StructToCharArray( const void& struct_object, // structure uchar& char_array[], // array uint start_pos=0 // starting position in the array );
ushort MathSwap(ushort value); uint MathSwap(uint value); ulong MathSwap(ulong value);
bool StringReserve( string& string_var, // string uint new_capacity // buffer size for the string );StringSetLength sets the specified string length in characters.
bool StringSetLength( string& string_var, // string uint new_length // new string length );
bool ArrayRemove( void& array[], // array of any type uint start, // the index to start removal uint count=WHOLE_ARRAY // number of elements );ArrayInsert inserts to a receiver array the specified number of elements from the source array, starting with the specified index.
bool ArrayInsert( void& dst_array[], // receiver array const void& src_array[], // source array uint dst_start, // index in the receiver array where to insert uint src_start=0, // index in the source array to start copying uint count=WHOLE_ARRAY // number of inserted elements );ArrayReverse reverses in an array the specified number of elements starting with the specified index.
bool ArrayReverse( void& array[], // array of any type uint start=0, // index to start reversing uint count=WHOLE_ARRAY // number of elements );
int CustomBookAdd( const string symbol, // symbol name const MqlBookInfo& books[] // an array with the DOM elements descriptions uint count=WHOLE_ARRAY // number of elements to be used );
bool CustomSymbolCreate( const string symbol_name, // custom symbol name const string symbol_path="", // name of the group in which the symbol will be created const string symbol_origin=NULL // name of the symbol based on which the custom symbol will be created );The name of the symbol, from which the properties of for the custom symbol should be copied, is specified in the "symbol_origin" parameter.
Added user interface translation into Croatian.
Documentation has been updated.