Author: Mico Yoshic
NEWS ALERT
Miscellaneous
It issuies visual alerts to the screen
2 Views
0 Downloads
0 Favorites
NEWS ALERT
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                   NEWS ALERT.mq4 |
//|                                                      Mico Yoshic |
//|                                              micoyoshic@mail.com |
//+------------------------------------------------------------------+
#property copyright "Mico Yoshic"
#property link      "www.micoyoshic.com"


//---- input parameters
extern double       NormalSpread=2;
extern double       NormalPipDistance=5;

double   sp,dt;


//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  { 
    dt=(MarketInfo(Symbol(),MODE_STOPLEVEL))-((Ask-Bid)*10000);
    sp=(MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID))*10000;
    
    if (dt>NormalPipDistance) {
        Alert("The Minimum Distance from the Current Price is now ",dt," Pips for the ",Symbol()," and its BIGGER THAN NORMAL");
        }
        return(true);
    
    if (MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID)>NormalSpread*MarketInfo(Symbol(),MODE_POINT)) {
        Alert("The Spread for ",Symbol()," is now ",sp," and its BIGGER THAN NORMAL");
        }
        return(true);

   return(0);
  }
  

Comments