Download MetaTrader 5

Experts: News EA Template Without DLL From 2 Sources

To add comments, please log in or register
Automated-Trading
Admin
118930
Automated-Trading  

News EA Template Without DLL From 2 Sources:

The functions included in this template use two news sources - Investing.com and Dailyfx.com. The template doesn’t use DLL.

Author: Yurij Izyumov

Peoples11
18
Peoples11  

Thank you Yurij, I did not know where to start making news release's part of my EA's. This should help greatly.

Nurudeen Amedu
56089
Nurudeen Amedu  

please i put your code in an indicator but it did not work

gave me error 4060

Yurij Izyumov
52218
Yurij Izyumov  
Nurudeen Amedu:

please i put your code in an indicator but it did not work

gave me error 4060


how? 

this is expert advisor - not indicator 

in which line error?

salexes
813
salexes  

This is great. I want to put a news filter inside my indicator, could you explain/help me to do it ?

Also is it possible to add forexfactory news aswell ?


kind regards

sexycool
185
sexycool  

Dear Yuri,


This would be a very great EA if it could be integrated into my EA where it would;


1.  Close all winning trades prior to news release (say 1 hour).

2.  Resume trading after news release (say 1 hour).

3.  Will not trade prior to news release say 3 hours.


I have been studying your EA for quite a while and still can't successfully integrate.  I only you could include a simple example to illustrate.

>For example, a trade function which uses stochastic as an indicator (for illustration).  Where your news EA would;


1.  Close all winning trades prior to news release (say 1 hour).

2.  Resume trading after news release (say 1 hour).

3.  Will not trade prior to news release say 3 hours.


I think it will just be an addition of few lines which is very simple for an expert like you Yuri but a headache to us who just started learning MT4.

I just started dabbling on MT4 for a couple of months and the EAs I created are simple. They work under normal conditions except during the release of news.  If only you could show an example it would be a great help to avoid my positions being overrun by news releases.


Thank you in advance Yuri.  Great work.


P.S.

Probably you could help.  Assuming below is my code (used fractals for an indicator) for entry and exit, how will I put them in your News EA to;

1.  Close all winning trades prior to news release (say 1 hour).

2.  Resume trading after news release (say 1 hour).

3.  Will not trade prior to news release say 3 hours. 




int signal_fractals()

{

   int signal = TRADE_SIGNAL_NEUTRAL;

   double upper = iFractals(NULL,0,MODE_UPPER,shift);

   double lower = iFractals(NULL,0,MODE_LOWER,shift);

   

   if (lower>0 && lower<EMPTY_VALUE)

      signal = TRADE_SIGNAL_BUY;


   else if (upper>0 && upper<EMPTY_VALUE)

      signal = TRADE_SIGNAL_SELL;

   

   return signal;

}

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

int signal_entry()

  {

   int signal=TRADE_SIGNAL_NEUTRAL;

//signal for entry.  I wonder how I will insert this to your EA correctly.

   signal = signal_add(signal,signal_fractals());

//return entry signal

   return signal;

  }

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

int signal_exit()

  {

   int signal=TRADE_SIGNAL_NEUTRAL;

//add entry signals below


//return exit signal

   return signal;

  }

lrakotoniaina
32
lrakotoniaina  

Hello,

Good job Yurij !

This EA works exactly as I expected : provides a heads up sign before the news release, displays an indicator on the chart, provides a template for custom trading strategy. For me just as indicator, its is already fine.

I will try adding my own features:

1- Synchronize the events with a Google calendar.

2- Implement a volatility strategy mainly opening up a straddle position triggered a few seconds before the release.

3- Once a position is opened, implement a hedging strategy.

4- Position size management


Many thanks for sharing your code with us.

Ivan Titov
3164
Ivan Titov  
It doesn't work with DailyFX. Just try this url in browser: http://www.dailyfx.com/files/Calendar-05-20-2018.csv
Mohammad Soubra
34883
Mohammad Soubra  
Ivan Titov:
It doesn't work with DailyFX. Just try this url in browser: http://www.dailyfx.com/files/Calendar-05-20-2018.csv
Ivan Titov
3164
Ivan Titov  
Mohammad Soubra:

Exactly. I have the same problem.

NoDealRoomForSquare
19
NoDealRoomForSquare  

Thank you,Yurij!

I tried to convert it to MQL5(some code's fixed),but it'z  NOT work..


so,could you indicate/make some code to convert to MT5?

To add comments, please log in or register