Good day Tanaka Akiko, here I put maybe another good idea you break the market
This EA YIPUY II an the preset, is very good in working,,, espcially on news,,, but the problem is the borker Alert you to stop this EAbeacuse saturate the servers, so if not they will block your accounts,
But the Idea that becomes is, if you can put a filter time,, for only work on news I think 15 minutes before and 15 minutes later,,, so this expert only catch the news in the correct time, and not have problems with the broker
Here is the base code, and a preset where you can test it, the broblems is the servers broker
Alfonso , here is your EA with news filter.
News filter code is based on FFcal.
If you want to run EA only High impact news period, you can select News impact level and
put period time you want run EA.
For exmple, if you put MinsBeforeNews=15, and MinsAfter News=15, then EA will start working
15min before HighImpact news and will stop trade 15min after High impact news time.
If you want to run EA exactly at the same time of impact news and want to run for 60 min,
then just MinsBeforeNews=0 and MinsAfter News=60.
By the way you know very well about FFcal indicator?
https://www.forexfactory.com/showthread.php?t=19293
I am still no sure how I can set OffSetHours, if you attach EA on your local PC, you will see remaining time until next news event , but
if you set EA in your VPS, remaining time is not the same, so I guess you need to put some OffSetHours to adjust the same time setting as your local PC. I guess this indicator automatically adjust remaining time until next event with using local PC time....?
Is that right? If you can find how we can set OffSetHours, please tell us because I am not familier with FFcal indi.
I also added Max_spread, so you can put the value if you like. If spread is bigger than input value, EA will not trade,
PS. NewsFilter function is not working during backtesting, so you need to run EA in demo account to check if it is working OK.

