How to write a news filter and stop trading if we have a high impact news?


Hi, i'm digging into the CalendarEvents and after a lot of tries i decided to write here in the forum.

I have a simple EA that after backtesting is showing decent results, but i want to implement a news filter on it.

For example if today has high impact news, stop the robot from trading.

Can anyone direct me with a bit of simple hint on how can i do it?