FF Calendar Indicator for MT - page 8

 
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.

 

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.....

}