KingOfSand: I am using the code that is in post #63. Isn't it possible to make above code to fit in?
Sorry, did not realize that it was fcal that needed to be re-written.
Is there another smooth way to get the numbers of minutes before and after nearest news/speech? I am trying to make an indi that turns of signals during news.
if ((NewsMinutes = 0) || (NewsMinutes >= DoNotAlertXXXXminutesAfterNews && NewsMinutes <=0)) NoNewsInSight = FALSE; // False means signals is stopped because during news.
else if ((NewsMinutes > DoNotAlertXXXXminutesBeforeNews && NewsMinutes >=0) || (NewsMinutes < DoNotAlertXXXXminutesAfterNews && NewsMinutes <=0)) NoNewsInSight = TRUE; // True means signals works. No news in sight.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I am using the code that is in post #63. Isn't it possible to make above code to fit in?
Sorry, did not realize that it was fcal that needed to be re-written.
Is there another smooth way to get the numbers of minutes before and after nearest news/speech? I am trying to make an indi that turns of signals during news.
It was quite simple to do..
int NewsMinutes = dispMinutes[0];
int DoNotAlertXXXXminutesBeforeNews = 25;
int DoNotAlertXXXXminutesAfterNews = -30;
bool = NoNewsInSight;
if ((NewsMinutes = 0) || (NewsMinutes >= DoNotAlertXXXXminutesAfterNews && NewsMinutes <=0)) NoNewsInSight = FALSE; // False means signals is stopped because during news.
else if ((NewsMinutes > DoNotAlertXXXXminutesBeforeNews && NewsMinutes >=0) || (NewsMinutes < DoNotAlertXXXXminutesAfterNews && NewsMinutes <=0)) NoNewsInSight = TRUE; // True means signals works. No news in sight.
if (NoNewsInSight){
Alert.....
}