Calendar Events from MT5 into EA

 

Hi,

does someone has information about the possibility to load the Event Calendar from MT5 into an EA Script?

Would be nice if anybody could help me with that.

 

Thanks. tMAE 

 
tMAE:

does someone has information about the possibility to load the Event Calendar from MT5 into an EA Script?

Would be nice if anybody could help me with that.

Built-in calendar is not acessible via MQL5 API, but you can use a lot of 3-d party codes which download and display news. Just search through the site.
 
I have not tested yet, but you can find a section about calendar event in the MQL5 language documentation

https://www.mql5.com/en/docs/calendar

Function

Action

CalendarCountryById

Get a country description by its ID

CalendarEventById

Get an event description by its ID

CalendarValueById

Get an event value description by its ID

CalendarCountries

Get the array of country names available in the calendar

CalendarEventByCountry

Get the array of descriptions of all events by the country code

CalendarEventByCurrency

Get the array of descriptions of all events

CalendarValueHistoryByEvent

Get the array of values for an event

CalendarValueHistory

Get the array of values for a currency and a currency

CalendarValueLastByEvent

Get the array of events by its ID

CalendarValueLast

Get the array of values for all events with the ability to change currency

Documentation on MQL5: Economic Calendar
Documentation on MQL5: Economic Calendar
  • www.mql5.com
This section describes the functions for working with the economic calendar available directly in the MetaTrader platform. The economic calendar is a ready-made encyclopedia featuring descriptions of macroeconomic indicators, their release dates and degrees of importance. Relevant values of macroeconomic indicators are sent to the MetaTrader...
 
Laurent Soudron:
I have not tested yet, but you can find a section about calendar event in the MQL5 language documentation

https://www.mql5.com/en/docs/calendar

Function

Action

CalendarCountryById

Get a country description by its ID

CalendarEventById

Get an event description by its ID

CalendarValueById

Get an event value description by its ID

CalendarCountries

Get the array of country names available in the calendar

CalendarEventByCountry

Get the array of descriptions of all events by the country code

CalendarEventByCurrency

Get the array of descriptions of all events

CalendarValueHistoryByEvent

Get the array of values for an event

CalendarValueHistory

Get the array of values for a currency and a currency

CalendarValueLastByEvent

Get the array of events by its ID

CalendarValueLast

Get the array of values for all events with the ability to change currency

Has anyone found a way to use the MetaQuotes calendar in an MT5 EA?

Thanks a lot,

Martin

 

Same topic is currently discussed here: https://www.mql5.com/en/forum/312462. Just follow the links there, where I show an implementation that works for both strategy tester and live trading.