Alert accumulates messages - page 2

 
macpee:
@FMIC, you are absolutely right. In fact, it triggers even after changing input parameter and when I change the chart time frame and so on. However, I think I like it that way. The only problem is that it should not be queued.

As GumRai explained, the Alert function keeps track of all alerts so that people that are away from there PC can view older alerts.

However, if you look at the Alert Window you will see that it is divided into two sections, the top one with the large icon is the Current Alert (that is the one you want), while the list below is the older alerts which you can simply ignore.

Alternatively, if you really just want a modal dialog box for the alert, then use the "MessageBox()" function.

 
macpee:
Then I think the working solution I need now is on how to clear the queues the moment the alert is triggered.
You cannot clear the Alert history. That is just the way Alerts work. Your requirement is very specific so use alternatives like the "MessageBox()" or just display a message on the chart itself and use "PlaySound()" to call attention to it.
 
Print() function and PlaySound() function may come handy though. However, I think It is good if the user does a little bit of work by closing the pop-up window.
 
macpee:
  However, I think It is good if the user does a little bit of work by closing the pop-up window.
In that case, then use the "MessageBox()" solution!
 
Ok thanks, I shall try it right away.
Reason: