bmkinyua

Trader
Dec 26, 2018
24
1
19
37
I have an EA that would read RSS from investing(dot)com and dailyfx(dot)com RSS feed breaking news and would send me emails as the breaking news would break. It used to work fine but has since been reporting nothing new to report even if there is news (screenshot shows the message, it is not an error but the message is false as there is news in the RSS feed).
1639386444236.png

Kindly assist check. The EA is attached.
 

Attachments

  • rssFXnews.mq4
    13.5 KB · Views: 15

Enivid

Administrator
Staff member
Nov 30, 2008
19,058
1,472
144
Odesa
www.earnforex.com
The error message says that there is nothing new to report. The indicator prints it when the current content of the RSS file is the same as the previous one.

Unfortunately, you didn't attach the HTMLTagsLib.mqh file, so I couldn't test it.
 

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
Attached,
Post automatically merged:

The error message says that there is nothing new to report. The indicator prints it when the current content of the RSS file is the same as the previous one.

Unfortunately, you didn't attach the HTMLTagsLib.mqh file, so I couldn't test it.
There are new news links in the RSS if you paste the RSS links in your browser. It was working before but it stopped. Kindly assist. I have attached the HTMLTagsLib,mqh
 

Attachments

  • HTMLTagsLib.mqh
    10 KB · Views: 7

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
I have a similar ea but now reads rss for economic calendar and that sends the emails fine. Would you want me to attach it so that you use it as a 'working control' for comparison?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,058
1,472
144
Odesa
www.earnforex.com
If you add this line after the line 30 in the source code (rssFXnews.mq4), you will be able to see the server's response to an HTTP request:
MQL4:
Print("headers: ", headers);
MetaTrader receives the following 403/forbidden response:
HTTP/1.1 403 Forbidden
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: keep-alive
Date: Tue, 14 Dec 2021 13:05:01 GMT
Content-Length: 16
Content-Type: text/plain; charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Server: cloudflare
X-Frame-Options: SAMEORIGIN
Referrer-Policy: same-origin
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
CF-RAY: 6bd7a4317

It looks like Cloudflare (used by both websites) is blocking attempts to connect to the websites - most likely, considering it bot traffic.

You could try sculpting the request header or the request cookie to bypass it, but I'm not sure if it's a viable method.
 

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
From our discussion, I had an Eureka moment. Since it is investing(dot)com and dailyfx(dot)com blocking, and I had mentioned I had another EA sending me Economic Calender news (from myfxbook(dot)com)... I simply used news RSS from myfxbook(dot)com.
Thank you very much. You can play around with the EAs for Economic Calender and Breaking News. They both work fine.

The reason for the extra effort on sending the RSS on email and notification was because RSS apps on Android app stores are not very efficient. The tend to 'sleep' and not send the breaking news as the are published, unless you open the apps then the send you notifications in bulk.

Thank you.
 

Attachments

  • rssFXcal.mq4
    11.9 KB · Views: 10
  • rssFXnews2.mq4
    20.2 KB · Views: 11
  • 👍
Reactions: Enivid

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
Hi Enivid,

Help with a situation where the EA sends multiple number of alerts for one RSS news tag. Can you assist stop sending multiple emails on one news tag even though the RSS link has one news item.
 

Attachments

  • rssFXnews3.mq4
    34.7 KB · Views: 10

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
Hi Enivid,

Help with a situation where the EA sends multiple number of alerts for one RSS news tag. Can you assist stop sending multiple emails on one news tag even though the RSS link has one news item.
1640823498855.png

Take note of the repeated news. But if you go to rss link, hte news links are one. Can you help stop the multiple sending of news?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,058
1,472
144
Odesa
www.earnforex.com
The EA doesn't check if the news has already been reported before sending. It only checks the entire RSS feed code to the previous version of the RSS feed it had read. So, if even one letter changes in the entire RSS feed, it will send everything again. For example, the RSS feed might include the current date/time - this would cause the difference between two RSS request results.
 

bmkinyua

Trader
Dec 26, 2018
24
1
19
37
The EA doesn't check if the news has already been reported before sending. It only checks the entire RSS feed code to the previous version of the RSS feed it had read. So, if even one letter changes in the entire RSS feed, it will send everything again. For example, the RSS feed might include the current date/time - this would cause the difference between two RSS request results.
Have any ideas how I can sort this?