Help with implementing news-based trade blocking in MQL5 EA from MetaTrader 5 calendar tab

 

Hello MQL5 Community,

I'm currently developing an Expert Advisor in MQL5 and I'm facing a challenge. I would like to incorporate the news events listed in the MetaTrader 5 Calendar tab into my EA.

Specifically, I aim to prevent the EA from operating during the peak hours surrounding significant news events. However, I haven't found many references on how to do this.

Could anyone provide insight or guidance on how to access and use the news information from the MetaTrader 5 Calendar tab in my EA? Tips on how to implement a mechanism to block trading activities during critical news hours would be greatly appreciated.

Thanks guys...

 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Andrea Ardemani: However, I haven't found many references on how to do this.

You did not find any references???

A simple search finds several resources. There may be more, but this was just a quick search:

  • MQL5 Documentation:

Documentation on MQL5: Economic Calendar

  • Articles:

Articles

MQL5 Cookbook – Economic Calendar

Denis Kirichenko, 2022.01.12 15:52

The article highlights the programming features of the Economic Calendar and considers creating a class for a simplified access to the calendar properties and receiving event values. Developing an indicator using CFTC non-commercial net positions serves as a practical example.
  • CodeBase:

Code Base

Economic Calendar Data Aggregator

teddy waweru, 2022.06.15 21:22

Service Script for aggregating Economic Calendar data to a .txt file

Code Base

Sample detect economic calendar

Mr Anucha Maneeyotin, 2021.09.28 04:20

This code use detect economic calendar and put pending order before released news time
Documentation on MQL5: Economic Calendar
Documentation on MQL5: Economic Calendar
  • www.mql5.com
Economic Calendar - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5