Discussion of article "MQL5 Cookbook – Economic Calendar"

 

New article MQL5 Cookbook – Economic Calendar has been published:

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.

Let's handle the time series structure in the following example. The Test_TS.mq5 script receives data on US non-farm payrolls from January 1, 2016 to November 1, 2021 and displays them on a scientific chart. Let's make it so that the chart has two curves - actual and forecast values. We will use the event reporting period as a timeline.

After launching the script, we first get displaying timeseries values to the journal and second, drawing the diagram on the chart (Fig. 2).


Nonfarm data (2016-2021)

Fig. 2. US Non-Farm Payrolls (2016-2021)

Author: Denis Kirichenko

 
This is just what I needed to comlete my work. Thank you for this article Denis, if you have time, can you make a follow up on how this can be implimented into an Expert CSignal class. 
 

After a long hiatus we finally have the genius calendar events module !!!!!!!
Can you graciously demonstrate again?

Example: UK's GDP (Gross Domestic Product) or Canada's (Consumer Sentiment Index)

I understand how to get the currency country_idevent ID ....
but It seems a bit difficult to rewrite based on Non-commercial net positions indicator

Can you graciously demonstrate again?
Thanks

 
is there any way, we can backtest using old news?
 
mnima.s #:
is there any way, we can backtest using old news?

I think, there should be a way ))  The task is to create a database before backtesting the news...

 

Hi Denis,

That's a really interesting article. I'm about to add some code to my EA for trade blocking based on news. On the economic calendar page of mql5.com there is a 90 day max range for viewing past data. Is that limit the same for MQL5 economic calendar API commands? I too am looking at backtesting.

Thanks

Reason: