Author: Mico Yoshic
NEWS ALERT

This tool is designed to act as a real-time monitoring system for your trading environment, specifically focusing on identifying unusual market conditions that could hinder your ability to execute trades effectively. It works by constantly scanning the live market data for two specific types of irregularities: Excessive Spreads and Restricted Distance Limits.

Here is a breakdown of how the logic functions:

1. Monitoring Market Spreads

The script continuously calculates the "Spread"—the difference between the price at which you can buy (Ask) and sell (Bid). It compares this live spread against a predefined "Normal" threshold that you set. If the market becomes volatile or liquidity drops, causing the spread to widen beyond your specified limit, the tool will trigger an immediate alert. This helps you avoid entering trades during periods where the cost of entry is disproportionately high.

2. Tracking Minimum Execution Distance

In many markets, there are restrictions on how close to the current price you can place a trade (often called "Stop Levels"). The script calculates the gap between the current market price and the minimum allowed distance permitted by the broker. If this distance becomes larger than your specified normal threshold, it alerts you. This is particularly useful for identifying moments when the market becomes too unstable for tight order placement, signaling that you might need to adjust your strategy or wait for better conditions.

Summary of Operation

Instead of requiring you to manually watch the numbers constantly, this script acts as a digital lookout. It monitors the underlying "health" of the price action and notifies you the moment the market behaves in a way that deviates from your established standards. It ensures that you are alerted to high-cost environments or restricted trading zones instantly, allowing for more informed decision-making during volatile sessions.

Miscellaneous
It issuies visual alerts to the screen
9 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