create alert by indicators/script? is that possible?

 
can you create alerts , the alerts in alert tab in the terminal i mean , using scripts/indicators?
 
William Roeder:

I did read your post. You asked “can you create alerts, using scripts/indicators.” The answer is call Alert.

give me an example of such indy or script that adds a alert that shows up in the alert tab of terminal.

 
  1. I apologize, you mean alerts as in price levels, not alerts as in messages.
  2. No way; just monitor price.
    double priceBuy=DBL_MAX;
    int OnCalculate(…){
       if(Bid >= priceBuy){ priceBuy=DBL_MAX; PlaySound("alert.wav"); }